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 take_first_child(&mut self) -> Option<CellContainer<C>>
fn take_first_child(&mut self) -> Option<CellContainer<C>>
Consumes the first child during the deep drop.
source§fn replace_first_child(
&mut self,
parent: CellContainer<C>
) -> Result<CellContainer<C>, CellContainer<C>>
fn replace_first_child( &mut self, parent: CellContainer<C> ) -> Result<CellContainer<C>, CellContainer<C>>
Replaces the first child with the provided parent during the deep drop. Read more
source§fn take_next_child(&mut self) -> Option<CellContainer<C>>
fn take_next_child(&mut self) -> Option<CellContainer<C>>
Consumes the next child (except first) during the deep drop.