pub struct BestBlock { /* private fields */ }
Expand description
The best known block as identified by its hash and height.
Implementations§
source§impl BestBlock
impl BestBlock
sourcepub fn from_network(network: Network) -> Self
pub fn from_network(network: Network) -> Self
Constructs a BestBlock
that represents the genesis block at height 0 of the given
network.
sourcepub fn new(block_hash: BlockHash, height: u32) -> Self
pub fn new(block_hash: BlockHash, height: u32) -> Self
Returns a BestBlock
as identified by the given block hash and height.
sourcepub fn block_hash(&self) -> BlockHash
pub fn block_hash(&self) -> BlockHash
Returns the best block hash.
Trait Implementations§
source§impl PartialEq for BestBlock
impl PartialEq for BestBlock
impl Copy for BestBlock
impl Eq for BestBlock
impl StructuralPartialEq for BestBlock
Auto Trait Implementations§
impl Freeze for BestBlock
impl RefUnwindSafe for BestBlock
impl Send for BestBlock
impl Sync for BestBlock
impl Unpin for BestBlock
impl UnwindSafe for BestBlock
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