pub enum BlockIdentifier {
ImmutableData(Digest),
StructuredData(Digest, SdName),
Link(LinkDescriptor),
}
Expand description
Dummy data identifiers for this crate
Variants§
ImmutableData(Digest)
hash is also name of data stored locally
StructuredData(Digest, SdName)
hash name (identity + tag) (stored localy as name in data store)
Link(LinkDescriptor)
This array represents this nodes current close roup The array is all nodes xored together This is unique to this node, but known by all nodes connected to it in this group.
Implementations§
Source§impl BlockIdentifier
impl BlockIdentifier
Sourcepub fn hash(&self) -> Digest
pub fn hash(&self) -> Digest
Define a name getter as data identifiers may contain more info that does not change the name (such as with structured data and versions etc.) In this module we do not care about other info and any validation is outwith this area Therefore we will delete before insert etc. based on name alone of the data element
Sourcepub fn structured_data_name(&self) -> Option<SdName>
pub fn structured_data_name(&self) -> Option<SdName>
structured data name != hash of the data or block
Trait Implementations§
Source§impl Clone for BlockIdentifier
impl Clone for BlockIdentifier
Source§fn clone(&self) -> BlockIdentifier
fn clone(&self) -> BlockIdentifier
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BlockIdentifier
impl Debug for BlockIdentifier
Source§impl Decodable for BlockIdentifier
impl Decodable for BlockIdentifier
Source§impl Encodable for BlockIdentifier
impl Encodable for BlockIdentifier
Source§impl PartialEq for BlockIdentifier
impl PartialEq for BlockIdentifier
impl StructuralPartialEq for BlockIdentifier
Auto Trait Implementations§
impl Freeze for BlockIdentifier
impl RefUnwindSafe for BlockIdentifier
impl Send for BlockIdentifier
impl Sync for BlockIdentifier
impl Unpin for BlockIdentifier
impl UnwindSafe for BlockIdentifier
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)