Struct duniter_documents::Blockstamp
[−]
[src]
pub struct Blockstamp { pub id: BlockId, pub hash: BlockHash, }
A blockstamp (Unique ID).
It's composed of the BlockId
and
the BlockHash
of the block.
Thanks to blockchain immutability and frequent block production, it can be used to date information.
Fields
id: BlockId
Block Id.
hash: BlockHash
Block hash.
Methods
impl Blockstamp
[src]
pub fn from_string(src: &str) -> Result<Blockstamp, BlockUIdParseError>
[src]
Create a BlockUId
from a text.
pub fn to_string(&self) -> String
[src]
Convert a BlockUId
to its text format.
Trait Implementations
impl Copy for Blockstamp
[src]
impl Clone for Blockstamp
[src]
fn clone(&self) -> Blockstamp
[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
impl PartialEq for Blockstamp
[src]
fn eq(&self, __arg_0: &Blockstamp) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Blockstamp) -> bool
[src]
This method tests for !=
.
impl Eq for Blockstamp
[src]
impl Hash for Blockstamp
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Blockstamp
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Debug for Blockstamp
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Default for Blockstamp
[src]
fn default() -> Blockstamp
[src]
Returns the "default value" for a type. Read more