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 CellImpl for StaticCell
 
impl CellImpl for StaticCell
Source§fn descriptor(&self) -> CellDescriptor
 
fn descriptor(&self) -> CellDescriptor
Returns cell descriptor. Read more
Source§fn virtualize(&self) -> &DynCell
 
fn virtualize(&self) -> &DynCell
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<Cell>
 
fn take_first_child(&mut self) -> Option<Cell>
Consumes the first child during the deep drop.
Source§fn replace_first_child(&mut self, parent: Cell) -> Result<Cell, Cell>
 
fn replace_first_child(&mut self, parent: Cell) -> Result<Cell, Cell>
Replaces the first child with the provided parent during the deep drop. Read more
Source§fn take_next_child(&mut self) -> Option<Cell>
 
fn take_next_child(&mut self) -> Option<Cell>
Consumes the next child (except first) during the deep drop.
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). Read more
Auto Trait Implementations§
impl Freeze for StaticCell
impl RefUnwindSafe for StaticCell
impl Send for StaticCell
impl Sync for StaticCell
impl Unpin for StaticCell
impl UnwindSafe for StaticCell
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