everscale_types::cell

Trait CellFamily

Source
pub trait CellFamily: Sized {
    type EmptyCellContext: CellContext;

    // Required methods
    fn empty_cell() -> Cell;
    fn empty_cell_ref() -> &'static DynCell;
    fn empty_context() -> Self::EmptyCellContext;
    fn all_zeros_ref() -> &'static DynCell;
    fn all_ones_ref() -> &'static DynCell;
    fn virtualize(cell: Cell) -> Cell;
}
Expand description

Cell implementation family.

Required Associated Types§

Source

type EmptyCellContext: CellContext

The default cell context type.

Required Methods§

Source

fn empty_cell() -> Cell

Creates an empty cell.

NOTE: in most cases empty cell is ZST.

Source

fn empty_cell_ref() -> &'static DynCell

Returns a static reference to the empty cell

Source

fn empty_context() -> Self::EmptyCellContext

Creates an empty cell context.

Source

fn all_zeros_ref() -> &'static DynCell

Returns a static reference to the cell with all zeros.

Source

fn all_ones_ref() -> &'static DynCell

Returns a static reference to the cell with all ones.

Source

fn virtualize(cell: Cell) -> Cell

Creates a virtualized cell from the specified cell.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl CellFamily for Cell

Source§

type EmptyCellContext = EmptyCellContext