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_number_optional<N: TonCellNum>( &mut self, bit_len: usize, maybe_val: Option<N>, ) -> 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_u16( &mut self, bit_len: usize, val: u16, ) -> 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_msg_address( &mut self, val: &MsgAddress, ) -> Result<&mut Self, TonCellError>

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 newly constructed Cell as a reference.

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_ref_cell_optional( &mut self, maybe_cell: Option<&ArcCell>, ) -> Result<&mut Self, TonCellError>

Source

pub fn store_dict_data<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 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 store_tonhash( &mut self, ton_hash: &TonHash, ) -> Result<&mut Self, TonCellError>

Source

pub fn remaining_bits(&self) -> usize

Source

pub fn store_number<N, B>( &mut self, bit_len: usize, data: B, ) -> Result<&mut Self, TonCellError>
where N: TonCellNum, B: Deref<Target = N>,

Source

pub fn write_bits_with_offset<T: AsRef<[u8]>>( &mut self, data: T, bit_len: usize, bit_offset: usize, ) -> Result<&mut Self, TonCellError>

Source

pub fn write_bits<T: AsRef<[u8]>>( &mut self, data: T, bit_len: usize, ) -> Result<&mut Self, TonCellError>

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.