tonlib_core::cell

Struct CellBuilder

source
pub struct CellBuilder { /* private fields */ }

Implementations§

source§

impl CellBuilder

source

pub fn new() -> CellBuilder

source

pub fn set_cell_is_exotic(&mut self, val: bool)

source

pub fn store_bit(&mut self, val: bool) -> Result<&mut Self, TonCellError>

source

pub fn store_u8( &mut self, bit_len: usize, val: u8, ) -> Result<&mut Self, TonCellError>

source

pub fn store_i8( &mut self, bit_len: usize, val: i8, ) -> Result<&mut Self, TonCellError>

source

pub fn store_u32( &mut self, bit_len: usize, val: u32, ) -> Result<&mut Self, TonCellError>

source

pub fn store_i32( &mut self, bit_len: usize, val: i32, ) -> Result<&mut Self, TonCellError>

source

pub fn store_u64( &mut self, bit_len: usize, val: u64, ) -> Result<&mut Self, TonCellError>

source

pub fn store_i64( &mut self, bit_len: usize, val: i64, ) -> Result<&mut Self, TonCellError>

source

pub fn store_uint( &mut self, bit_len: usize, val: &BigUint, ) -> Result<&mut Self, TonCellError>

source

pub fn store_int( &mut self, bit_len: usize, val: &BigInt, ) -> Result<&mut Self, TonCellError>

source

pub fn store_byte(&mut self, val: u8) -> Result<&mut Self, TonCellError>

source

pub fn store_slice(&mut self, slice: &[u8]) -> Result<&mut Self, TonCellError>

source

pub fn store_bits( &mut self, bit_len: usize, slice: &[u8], ) -> Result<&mut Self, TonCellError>

source

pub fn store_string(&mut self, val: &str) -> Result<&mut Self, TonCellError>

source

pub fn store_coins(&mut self, val: &BigUint) -> Result<&mut Self, TonCellError>

source

pub fn store_raw_address( &mut self, val: &TonAddress, ) -> Result<&mut Self, TonCellError>

Stores address without optimizing hole address

source

pub fn store_address( &mut self, val: &TonAddress, ) -> Result<&mut Self, TonCellError>

Stores address optimizing hole address two to bits

source

pub fn store_reference( &mut self, cell: &ArcCell, ) -> Result<&mut Self, TonCellError>

Adds reference to an existing Cell.

The reference is passed as ArcCell so it might be references from other cells.

source

pub fn store_references( &mut self, refs: &[ArcCell], ) -> Result<&mut Self, TonCellError>

source

pub fn store_child(&mut self, cell: Cell) -> Result<&mut Self, TonCellError>

Adds a reference to a newly constructed Cell.

The cell is wrapped it the Arc.

source

pub fn store_remaining_bits( &mut self, parser: &mut CellParser<'_>, ) -> Result<&mut Self, TonCellError>

source

pub fn store_cell_data( &mut self, cell: &Cell, ) -> Result<&mut Self, TonCellError>

source

pub fn store_cell(&mut self, cell: &Cell) -> Result<&mut Self, TonCellError>

source

pub fn store_either_cell_or_cell_ref( &mut self, cell: &ArcCell, layout: EitherCellLayout, ) -> Result<&mut Self, TonCellError>

source

pub fn store_maybe_cell_ref( &mut self, maybe_cell: &Option<ArcCell>, ) -> Result<&mut Self, TonCellError>

source

pub fn store_dict<K, V>( &mut self, key_len_bits: usize, value_writer: ValWriter<V>, data: HashMap<K, V>, ) -> Result<&mut Self, TonCellError>
where BigUint: From<K>,

source

pub fn remaining_bits(&self) -> usize

source

pub fn build(&mut self) -> Result<Cell, TonCellError>

Trait Implementations§

source§

impl Default for CellBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.