Struct everscale_types::cell::StaticCell
source · pub struct StaticCell { /* private fields */ }Expand description
Static cell which can be used to create cell references in const context.
Implementations§
source§impl StaticCell
impl StaticCell
sourcepub const unsafe fn new(
data: &'static [u8],
bit_len: u16,
hash: &'static [u8; 32]
) -> Self
pub const unsafe fn new(
data: &'static [u8],
bit_len: u16,
hash: &'static [u8; 32]
) -> Self
Creates a new plain ordinary cell from parts.
Safety
The following must be true:
- Data must be well-formed and normalized (contain bit tag if needed and
be enough to store
bit_lenof bits). bit_lenmust be in range 0..=1023hashmust be a correct hash for the current cell.
Trait Implementations§
source§impl<C: CellFamily> Cell<C> for StaticCell
impl<C: CellFamily> Cell<C> for StaticCell
source§fn descriptor(&self) -> CellDescriptor
fn descriptor(&self) -> CellDescriptor
Returns cell descriptor. Read more
source§fn reference_cloned(&self, _: u8) -> Option<CellContainer<C>>
fn reference_cloned(&self, _: u8) -> Option<CellContainer<C>>
Returns the Nth child cell.
source§fn virtualize(&self) -> &dyn Cell<C>
fn virtualize(&self) -> &dyn Cell<C>
Returns this cell as a virtualized cell, so that all hashes
and depths will have an offset.
source§fn stats(&self) -> CellTreeStats
fn stats(&self) -> CellTreeStats
Returns the sum of all bits and cells of all elements in the cell tree
(including this cell).