pub struct BlockStuff { /* private fields */ }Expand description
Deserialized block.
Implementations§
Source§impl BlockStuff
impl BlockStuff
Sourcepub const BOOT_OFFSET: Duration
pub const BOOT_OFFSET: Duration
Time until the block is considered “trusted”. We use it to force all new nodes to download at least this amount of history.
pub fn compute_is_persistent(block_utime: u32, prev_utime: u32) -> bool
pub fn can_use_for_boot(block_utime: u32, now_utime: u32) -> bool
pub fn time_until_can_use_for_boot(block_utime: u32, now_utime: u32) -> Duration
pub fn from_block_and_root( id: &BlockId, block: Block, root: Cell, data_size: usize, ) -> Self
pub fn deserialize_checked(id: &BlockId, data: &[u8]) -> Result<Self>
pub fn deserialize(id: &BlockId, data: &[u8]) -> Result<Self>
pub fn root_cell(&self) -> &Cell
pub fn data_size(&self) -> usize
pub fn with_archive_data<A>(self, data: A) -> WithArchiveData<Self>
pub fn id(&self) -> &BlockId
pub fn block(&self) -> &Block
pub fn into_block(self) -> Block
pub fn construct_prev_id(&self) -> Result<(BlockId, Option<BlockId>)>
pub fn load_info(&self) -> Result<&BlockInfo, Error>
pub fn load_extra(&self) -> Result<&BlockExtra, Error>
pub fn load_custom(&self) -> Result<&McBlockExtra, Error>
pub fn shard_blocks(&self) -> Result<FastHashMap<ShardIdent, BlockId>>
pub fn shard_blocks_seqno(&self) -> Result<FastHashMap<ShardIdent, u32>>
Trait Implementations§
Source§impl AsRef<Block> for BlockStuff
impl AsRef<Block> for BlockStuff
Source§impl Clone for BlockStuff
impl Clone for BlockStuff
Source§fn clone(&self) -> BlockStuff
fn clone(&self) -> BlockStuff
Returns a duplicate 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 RefCnt for BlockStuff
impl RefCnt for BlockStuff
Source§fn into_ptr(me: Self) -> *mut Self::Base
fn into_ptr(me: Self) -> *mut Self::Base
Converts the smart pointer into a raw pointer, without affecting the reference count. Read more
Source§fn as_ptr(me: &Self) -> *mut Self::Base
fn as_ptr(me: &Self) -> *mut Self::Base
Provides a view into the smart pointer as a raw pointer. Read more
Auto Trait Implementations§
impl Freeze for BlockStuff
impl !RefUnwindSafe for BlockStuff
impl Send for BlockStuff
impl Sync for BlockStuff
impl Unpin for BlockStuff
impl !UnwindSafe for BlockStuff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more