Struct everscale_types::boc::Boc
source · pub struct Boc;Expand description
BOC (Bag Of Cells) helper.
Implementations§
source§impl Boc
impl Boc
sourcepub fn encode_base64<T>(cell: T) -> Stringwhere
T: Borrow<DynCell>,
pub fn encode_base64<T>(cell: T) -> Stringwhere T: Borrow<DynCell>,
Encodes the specified cell tree as BOC and
returns the base64 encoded bytes as a string.
sourcepub fn encode<T>(cell: T) -> Vec<u8>where
T: Borrow<DynCell>,
pub fn encode<T>(cell: T) -> Vec<u8>where T: Borrow<DynCell>,
Encodes the specified cell tree as BOC.
sourcepub fn encode_pair<T1, T2>((cell1, cell2): (T1, T2)) -> Vec<u8>where
T1: Borrow<DynCell>,
T2: Borrow<DynCell>,
pub fn encode_pair<T1, T2>((cell1, cell2): (T1, T2)) -> Vec<u8>where T1: Borrow<DynCell>, T2: Borrow<DynCell>,
Encodes a pair of cell trees as BOC.
sourcepub fn decode_base64<T: AsRef<[u8]>>(data: T) -> Result<Cell, Error>
pub fn decode_base64<T: AsRef<[u8]>>(data: T) -> Result<Cell, Error>
Decodes a base64 encoded BOC into a cell tree
using the default Cell family finalizer.
sourcepub fn decode<T>(data: T) -> Result<Cell, Error>where
T: AsRef<[u8]>,
pub fn decode<T>(data: T) -> Result<Cell, Error>where T: AsRef<[u8]>,
Decodes a cell tree using the default Cell family finalizer.
sourcepub fn decode_pair<T>(data: T) -> Result<(Cell, Cell), Error>where
T: AsRef<[u8]>,
pub fn decode_pair<T>(data: T) -> Result<(Cell, Cell), Error>where T: AsRef<[u8]>,
Decodes a pair of cell trees using the default Cell family finalizer.
source§impl Boc
impl Boc
sourcepub fn deserialize<'de, D>(deserializer: D) -> Result<Cell, D::Error>where
D: Deserializer<'de>,
pub fn deserialize<'de, D>(deserializer: D) -> Result<Cell, D::Error>where D: Deserializer<'de>,
Deserializes cell from an encoded BOC (from base64 for human readable deserializers).