pub struct BlockTreeEntry<'a> { /* private fields */ }
Expand description
A block tree entry that is tied to a specific ChainstateManager
.
Internally the ChainstateManager
keeps an in-memory of the current block
tree once it is loaded. The BlockTreeEntry
points to an entry in this tree.
It is only valid as long as the ChainstateManager
it was retrieved from
remains in scope.
Implementations§
Source§impl<'a> BlockTreeEntry<'a>
impl<'a> BlockTreeEntry<'a>
Sourcepub fn prev(self) -> Option<BlockTreeEntry<'a>>
pub fn prev(self) -> Option<BlockTreeEntry<'a>>
Move to the previous entry in the block tree. E.g. from height n to height n-1.
Sourcepub fn block_hash(&self) -> BlockHash
pub fn block_hash(&self) -> BlockHash
Returns the current block hash associated with this BlockTreeEntry.
Trait Implementations§
Source§impl<'a> Clone for BlockTreeEntry<'a>
impl<'a> Clone for BlockTreeEntry<'a>
Source§impl<'a> Debug for BlockTreeEntry<'a>
impl<'a> Debug for BlockTreeEntry<'a>
impl<'a> Copy for BlockTreeEntry<'a>
impl Send for BlockTreeEntry<'_>
impl Sync for BlockTreeEntry<'_>
Auto Trait Implementations§
impl<'a> Freeze for BlockTreeEntry<'a>
impl<'a> RefUnwindSafe for BlockTreeEntry<'a>
impl<'a> Unpin for BlockTreeEntry<'a>
impl<'a> UnwindSafe for BlockTreeEntry<'a>
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