Enum data_chain::block_identifier::BlockIdentifier
[−]
[src]
pub enum BlockIdentifier { ImmutableData(Digest), StructuredData(Digest, SdName), Link(LinkDescriptor), }
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.
Methods
impl BlockIdentifier
[src]
pub fn hash(&self) -> Digest
[src]
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
pub fn structured_data_name(&self) -> Option<SdName>
[src]
structured data name != hash of the data or block
pub fn is_link(&self) -> bool
[src]
Is this a link
pub fn is_block(&self) -> bool
[src]
Is this a block
Trait Implementations
impl Encodable for BlockIdentifier
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
[src]
Serialize a value using an Encoder
.
impl Decodable for BlockIdentifier
[src]
fn decode<__D: Decoder>(
__arg_0: &mut __D
) -> Result<BlockIdentifier, __D::Error>
[src]
__arg_0: &mut __D
) -> Result<BlockIdentifier, __D::Error>
Deserialize a value using a Decoder
.
impl PartialEq for BlockIdentifier
[src]
fn eq(&self, __arg_0: &BlockIdentifier) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BlockIdentifier) -> bool
[src]
This method tests for !=
.
impl Debug for BlockIdentifier
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for BlockIdentifier
[src]
fn clone(&self) -> BlockIdentifier
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more