Struct disarray_ledger::blocks::BlockHeader
source · pub struct BlockHeader {
pub difficulty: BlockDifficulty,
pub justification: BlockJustification,
pub nonce: BlockNc,
pub parent: H256,
pub rand: u128,
pub root: H256,
pub timestamp: BlockTs,
}
Fields
difficulty: BlockDifficulty
justification: BlockJustification
nonce: BlockNc
parent: H256
rand: u128
root: H256
timestamp: BlockTs
Implementations
sourceimpl BlockHeader
impl BlockHeader
pub fn new(
difficulty: BlockDifficulty,
justification: BlockJustification,
nonce: BlockNc,
parent: H256,
rand: u128,
root: H256,
timestamp: i64
) -> Self
Trait Implementations
sourceimpl BlockHeaderSpec for BlockHeader
impl BlockHeaderSpec for BlockHeader
sourceimpl Clone for BlockHeader
impl Clone for BlockHeader
sourcefn clone(&self) -> BlockHeader
fn clone(&self) -> BlockHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for BlockHeader
impl Debug for BlockHeader
sourceimpl<'de> Deserialize<'de> for BlockHeader
impl<'de> Deserialize<'de> for BlockHeader
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for BlockHeader
impl Display for BlockHeader
sourceimpl Hash for BlockHeader
impl Hash for BlockHeader
sourceimpl Hashable for BlockHeader
impl Hashable for BlockHeader
sourceimpl PartialEq<BlockHeader> for BlockHeader
impl PartialEq<BlockHeader> for BlockHeader
sourcefn eq(&self, other: &BlockHeader) -> bool
fn eq(&self, other: &BlockHeader) -> bool
sourceimpl Resistable for BlockHeader
impl Resistable for BlockHeader
fn pos_difficulty(&self) -> H256
fn pow_difficulty(&self) -> H256
sourceimpl Serialize for BlockHeader
impl Serialize for BlockHeader
sourceimpl Verifiable for BlockHeader
impl Verifiable for BlockHeader
impl Eq for BlockHeader
impl StructuralEq for BlockHeader
impl StructuralPartialEq for BlockHeader
Auto Trait Implementations
impl RefUnwindSafe for BlockHeader
impl Send for BlockHeader
impl Sync for BlockHeader
impl Unpin for BlockHeader
impl UnwindSafe for BlockHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.