Struct bitcoin_block::BlockHeader
source · pub struct BlockHeader {
pub n_version: i32,
pub hash_prev_block: u256,
pub hash_merkle_root: u256,
pub n_time: u32,
pub n_bits: u32,
pub n_nonce: u32,
}Expand description
| Nodes collect new transactions into a block, | hash them into a hash tree, and scan through | nonce values to make the block’s hash satisfy | proof-of-work requirements. | | When they solve the proof-of-work, they | broadcast the block to everyone and the block | is added to the block chain. | | The first transaction in the block is | a special one that creates a new coin owned by | the creator of the block. |
Fields§
§n_version: i32— header —
hash_prev_block: u256§hash_merkle_root: u256§n_time: u32§n_bits: u32§n_nonce: u32Implementations§
Trait Implementations§
source§impl Clone for BlockHeader
impl Clone for BlockHeader
source§fn clone(&self) -> BlockHeader
fn clone(&self) -> BlockHeader
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 Default for BlockHeader
impl Default for BlockHeader
source§impl<'de> Deserialize<'de> for BlockHeader
impl<'de> Deserialize<'de> for BlockHeader
source§fn 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
source§impl PartialEq<BlockHeader> for BlockHeader
impl PartialEq<BlockHeader> for BlockHeader
source§fn eq(&self, other: &BlockHeader) -> bool
fn eq(&self, other: &BlockHeader) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for BlockHeader
impl Serialize 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§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more