pub struct CellBuilder { /* private fields */ }
Implementations§
Source§impl CellBuilder
impl CellBuilder
pub fn new() -> CellBuilder
pub fn set_cell_is_exotic(&mut self, val: bool)
pub fn store_bit(&mut self, val: bool) -> Result<&mut Self, TonCellError>
pub fn store_number_optional<N: TonCellNum>( &mut self, bit_len: usize, maybe_val: Option<N>, ) -> Result<&mut Self, TonCellError>
pub fn store_u8( &mut self, bit_len: usize, val: u8, ) -> Result<&mut Self, TonCellError>
pub fn store_i8( &mut self, bit_len: usize, val: i8, ) -> Result<&mut Self, TonCellError>
pub fn store_u16( &mut self, bit_len: usize, val: u16, ) -> Result<&mut Self, TonCellError>
pub fn store_u32( &mut self, bit_len: usize, val: u32, ) -> Result<&mut Self, TonCellError>
pub fn store_i32( &mut self, bit_len: usize, val: i32, ) -> Result<&mut Self, TonCellError>
pub fn store_u64( &mut self, bit_len: usize, val: u64, ) -> Result<&mut Self, TonCellError>
pub fn store_i64( &mut self, bit_len: usize, val: i64, ) -> Result<&mut Self, TonCellError>
pub fn store_uint( &mut self, bit_len: usize, val: &BigUint, ) -> Result<&mut Self, TonCellError>
pub fn store_int( &mut self, bit_len: usize, val: &BigInt, ) -> Result<&mut Self, TonCellError>
pub fn store_byte(&mut self, val: u8) -> Result<&mut Self, TonCellError>
pub fn store_slice(&mut self, slice: &[u8]) -> Result<&mut Self, TonCellError>
pub fn store_bits( &mut self, bit_len: usize, slice: &[u8], ) -> Result<&mut Self, TonCellError>
pub fn store_string(&mut self, val: &str) -> Result<&mut Self, TonCellError>
pub fn store_coins(&mut self, val: &BigUint) -> Result<&mut Self, TonCellError>
Sourcepub fn store_raw_address(
&mut self,
val: &TonAddress,
) -> Result<&mut Self, TonCellError>
pub fn store_raw_address( &mut self, val: &TonAddress, ) -> Result<&mut Self, TonCellError>
Stores address without optimizing hole address
Sourcepub fn store_address(
&mut self,
val: &TonAddress,
) -> Result<&mut Self, TonCellError>
pub fn store_address( &mut self, val: &TonAddress, ) -> Result<&mut Self, TonCellError>
Stores address optimizing hole address two to bits
pub fn store_msg_address( &mut self, val: &MsgAddress, ) -> Result<&mut Self, TonCellError>
Sourcepub fn store_reference(
&mut self,
cell: &ArcCell,
) -> Result<&mut Self, TonCellError>
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.
pub fn store_references( &mut self, refs: &[ArcCell], ) -> Result<&mut Self, TonCellError>
Sourcepub fn store_child(&mut self, cell: Cell) -> Result<&mut Self, TonCellError>
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
.
pub fn store_remaining_bits( &mut self, parser: &mut CellParser<'_>, ) -> Result<&mut Self, TonCellError>
pub fn store_cell_data( &mut self, cell: &Cell, ) -> Result<&mut Self, TonCellError>
pub fn store_cell(&mut self, cell: &Cell) -> Result<&mut Self, TonCellError>
pub fn store_either_cell_or_cell_ref( &mut self, cell: &ArcCell, layout: EitherCellLayout, ) -> Result<&mut Self, TonCellError>
pub fn store_ref_cell_optional( &mut self, maybe_cell: Option<&ArcCell>, ) -> Result<&mut Self, TonCellError>
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>
pub fn store_dict<K, V>( &mut self, key_len_bits: usize, value_writer: ValWriter<V>, data: HashMap<K, V>, ) -> Result<&mut Self, TonCellError>
pub fn store_tonhash( &mut self, ton_hash: &TonHash, ) -> Result<&mut Self, TonCellError>
pub fn remaining_bits(&self) -> usize
pub fn store_number<N, B>(
&mut self,
bit_len: usize,
data: B,
) -> Result<&mut Self, TonCellError>where
N: TonCellNum,
B: Deref<Target = N>,
pub fn write_bits_with_offset<T: AsRef<[u8]>>( &mut self, data: T, bit_len: usize, bit_offset: usize, ) -> Result<&mut Self, TonCellError>
pub fn write_bits<T: AsRef<[u8]>>( &mut self, data: T, bit_len: usize, ) -> Result<&mut Self, TonCellError>
pub fn build(&mut self) -> Result<Cell, TonCellError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CellBuilder
impl RefUnwindSafe for CellBuilder
impl Send for CellBuilder
impl Sync for CellBuilder
impl Unpin for CellBuilder
impl UnwindSafe for CellBuilder
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