pub struct BestBlock { /* private fields */ }
Expand description
The best known block as identified by its hash and height.
Implementations
sourceimpl BestBlock
impl BestBlock
sourcepub fn from_genesis(network: Network) -> Self
pub fn from_genesis(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
impl Copy for BestBlock
impl StructuralPartialEq for BestBlock
Auto Trait Implementations
impl RefUnwindSafe for BestBlock
impl Send for BestBlock
impl Sync for BestBlock
impl Unpin for BestBlock
impl UnwindSafe for BestBlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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