pub struct Cell { /* private fields */ }
Implementations§
Source§impl Cell
impl Cell
pub fn new( data: Vec<u8>, bit_len: usize, references: Vec<ArcCell>, is_exotic: bool, ) -> Result<Self, TonCellError>
pub fn parser(&self) -> CellParser<'_>
pub fn parse<F, T>(&self, parse: F) -> Result<T, TonCellError>
pub fn parse_fully<F, T>(&self, parse: F) -> Result<T, TonCellError>
pub fn reference(&self, idx: usize) -> Result<&ArcCell, TonCellError>
pub fn data(&self) -> &[u8] ⓘ
pub fn bit_len(&self) -> usize
pub fn references(&self) -> &[ArcCell] ⓘ
pub fn cell_depth(&self) -> u16
pub fn get_depth(&self, level: u8) -> u16
pub fn cell_hash(&self) -> TonHash
pub fn get_hash(&self, level: u8) -> TonHash
pub fn is_exotic(&self) -> bool
pub fn is_library(&self) -> bool
pub fn cell_hash_base64(&self) -> String
pub fn load_snake_formatted_string(&self) -> Result<String, TonCellError>
pub fn to_arc(self) -> ArcCell
Sourcepub fn expect_reference_count(
&self,
expected_refs: usize,
) -> Result<(), TonCellError>
👎Deprecated
pub fn expect_reference_count( &self, expected_refs: usize, ) -> Result<(), TonCellError>
It is recommended to use CellParser::next_reference() instead
Trait Implementations§
Source§impl TLB for Cell
impl TLB for Cell
Source§fn read_definition(parser: &mut CellParser<'_>) -> Result<Self, TonCellError>
fn read_definition(parser: &mut CellParser<'_>) -> Result<Self, TonCellError>
read-write definition
https://docs.ton.org/v3/documentation/data-formats/tlb/tl-b-language#overview
must be implemented by all TLB objects
doesn’t include prefix handling
fn write_definition( &self, builder: &mut CellBuilder, ) -> Result<(), TonCellError>
fn from_boc(boc: &[u8]) -> Result<Self, TonCellError>
const PREFIX: TLBPrefix = TLBPrefix::NULL
fn read(parser: &mut CellParser<'_>) -> Result<Self, TonCellError>
fn write(&self, dst: &mut CellBuilder) -> Result<(), TonCellError>
fn from_boc_hex(boc_hex: &str) -> Result<Self, TonCellError>
fn from_boc_b64(boc_b64: &str) -> Result<Self, TonCellError>
fn to_boc(&self, add_crc32: bool) -> Result<Vec<u8>, TonCellError>
fn to_boc_hex(&self, add_crc32: bool) -> Result<String, TonCellError>
fn to_boc_b64(&self, add_crc32: bool) -> Result<String, TonCellError>
Source§fn verify_prefix(parser: &mut CellParser<'_>) -> Result<(), TonCellError>
fn verify_prefix(parser: &mut CellParser<'_>) -> Result<(), TonCellError>
Helpers - for internal use
fn write_prefix(builder: &mut CellBuilder) -> Result<(), TonCellError>
Source§impl TonMessage for Cell
impl TonMessage for Cell
impl Eq for Cell
impl StructuralPartialEq for Cell
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
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