pub struct MetadataFields {
pub source: [u8; 24],
pub target: [u8; 24],
pub scoped_key: u64,
pub target_id: u64,
pub metadata_type: u8,
}Expand description
メタデータの1件を指す項目。compositeHash を作る材料
Fields§
§source: [u8; 24]§target: [u8; 24]§scoped_key: u64§target_id: u64§metadata_type: u8Implementations§
Source§impl MetadataFields
impl MetadataFields
Sourcepub fn from_row(value: &[u8]) -> Option<Self>
pub fn from_row(value: &[u8]) -> Option<Self>
状態の行の値(execute::persist の形。送り主、宛先、キー、対象の ID、種類、値の大きさ、値)から
Sourcepub fn search_key(&self, prefix: u8) -> Vec<u8> ⓘ
pub fn search_key(&self, prefix: u8) -> Vec<u8> ⓘ
並べ方 prefix(METADATA_BY_SOURCE など)での、検索表のキー。ID は上位から書くので、キーの順は REST の16進の順と同じ
Sourcepub fn search_keys(&self) -> Vec<Vec<u8>>
pub fn search_keys(&self) -> Vec<Vec<u8>>
検索表に入れるキー。対象からの並べ方は、モザイクとネームスペースのメタデータだけ
Sourcepub fn composite_hash(&self) -> Option<[u8; 32]>
pub fn composite_hash(&self) -> Option<[u8; 32]>
1件を指すハッシュ(compositeHash)。知らない種類なら None
Sourcepub fn from_search_key(key: &[u8]) -> Option<Self>
pub fn from_search_key(key: &[u8]) -> Option<Self>
検索表のキーから。MetadataFields::search_keys の逆
Trait Implementations§
Source§impl Clone for MetadataFields
impl Clone for MetadataFields
Source§fn clone(&self) -> MetadataFields
fn clone(&self) -> MetadataFields
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MetadataFields
Source§impl Debug for MetadataFields
impl Debug for MetadataFields
impl Eq for MetadataFields
Source§impl PartialEq for MetadataFields
impl PartialEq for MetadataFields
impl StructuralPartialEq for MetadataFields
Auto Trait Implementations§
impl Freeze for MetadataFields
impl RefUnwindSafe for MetadataFields
impl Send for MetadataFields
impl Sync for MetadataFields
impl Unpin for MetadataFields
impl UnsafeUnpin for MetadataFields
impl UnwindSafe for MetadataFields
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more