pub fn cell_serialized_size(&self, cell: &Cell, ref_size: usize) -> usize {
        if self.absent.contains(&cell.repr_hash()) {
            1 +
            (1 + cell.level() as usize + 1) * SHA256_SIZE
        } else {
            let bits = cell.bit_length();
            2 +
            if cell.store_hashes() { (cell.level() as usize + 1) * (SHA256_SIZE + DEPTH_SIZE) } else { 0 } +
            (bits / 8) + if bits % 8 != 0 { 1 } else { 0 } +
            cell.references_count() * ref_size
        }
    }
/// Serialized cell size including descriptor bytes and competition tag
Serialized cell size including descriptor bytes and competition tag
Serialized cell size including descriptor bytes and competition tag
pub fn cell_serialized_size(&self, cell: &Cell, ref_size: usize) -> usize {
        if self.absent.contains(&cell.repr_hash()) {
            1 +
            (1 + cell.level() as usize + 1) * SHA256_SIZE
        } else {
            let bits = cell.bit_length();
            2 +
            if cell.store_hashes() { (cell.level() as usize + 1) * (SHA256_SIZE + DEPTH_SIZE) } else { 0 } +
            (bits / 8) + if bits % 8 != 0 { 1 } else { 0 } +
            cell.references_count() * ref_size
        }
    }
pub fn cell_serialized_size ( & self , cell : & Cell , ref_size : usize ) -> usize { if self . absent . contains ( & cell . repr_hash ( ) ) { 1 + ( 1 + cell . level ( ) as usize + 1 ) * SHA256_SIZE } else { let bits = cell . bit_length ( ) ; 2 + if cell . store_hashes ( ) { ( cell . level ( ) as usize + 1 ) * ( SHA256_SIZE + DEPTH_SIZE ) } else { 0 } + ( bits / 8 ) + if bits % 8 != 0 { 1 } else { 0 } + cell . references_count ( ) * ref_size } }
Serialized cell size including descriptor bytes and competition tag
Serialized cell size including descriptor bytes and competition tag
&self
cell
&Cell
ref_size
usize
&self
cell
&Cell
ref_size
usize