pub struct BlockInfo {Show 24 fields
pub version: u32,
pub not_master: bool,
pub after_merge: bool,
pub before_split: bool,
pub after_split: bool,
pub want_split: bool,
pub want_merge: bool,
pub key_block: bool,
pub vert_seqno_incr: bool,
pub flags: u8,
pub seqno: u32,
pub vert_seqno: u32,
pub shard: ShardIdent,
pub gen_utime: u32,
pub start_lt: u64,
pub end_lt: u64,
pub gen_validator_list_has_short: u32,
pub gen_catchain_seqno: u32,
pub min_ref_mc_seqno: u32,
pub prev_key_block_seqno: u32,
pub gen_software: Option<GlobalVersion>,
pub master_ref: Option<ExtBlockRef>,
pub prev_ref: PrevBlockInfo,
pub prev_vert_ref: Option<ExtBlockRef>,
}Expand description
Struct doesn’t check invariant during read/write. So you’re free to build incorrect block_info cell For example, set is_master == false and master_ref != None Don’t do it and everything will be fine
Fields§
§version: u32§not_master: bool§after_merge: bool§before_split: bool§after_split: bool§want_split: bool§want_merge: bool§key_block: bool§vert_seqno_incr: bool§flags: u8§seqno: u32§vert_seqno: u32§shard: ShardIdent§gen_utime: u32§start_lt: u64§end_lt: u64§gen_validator_list_has_short: u32§gen_catchain_seqno: u32§min_ref_mc_seqno: u32§prev_key_block_seqno: u32§gen_software: Option<GlobalVersion>§master_ref: Option<ExtBlockRef>§prev_ref: PrevBlockInfo§prev_vert_ref: Option<ExtBlockRef>Implementations§
Source§impl BlockInfo
impl BlockInfo
pub fn prev_block_ids(&self) -> Result<Vec<BlockIdExt>, TLCoreError>
Trait Implementations§
Source§impl TLB for BlockInfo
impl TLB for BlockInfo
const PREFIX: TLBPrefix
Source§fn read_definition(parser: &mut CellParser<'_>) -> Result<Self, TLCoreError>
fn read_definition(parser: &mut CellParser<'_>) -> Result<Self, TLCoreError>
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<(), TLCoreError>
Source§fn read(parser: &mut CellParser<'_>) -> Result<Self, TLCoreError>
fn read(parser: &mut CellParser<'_>) -> Result<Self, TLCoreError>
interface - must be used by external code to read/write TLB objects
fn write(&self, builder: &mut CellBuilder) -> Result<(), TLCoreError>
fn cell_hash(&self) -> Result<TonHash, TLCoreError>
fn from_boc(boc: &[u8]) -> Result<Self, TLCoreError>
fn from_boc_hex(boc: &str) -> Result<Self, TLCoreError>
fn from_boc_b64(boc: &str) -> Result<Self, TLCoreError>
fn to_cell_ref(&self) -> Result<TonCellRef, TLCoreError>
fn to_boc(&self) -> Result<Vec<u8>, TLCoreError>
fn to_boc_hex(&self) -> Result<String, TLCoreError>
fn to_boc_base64(&self) -> Result<String, TLCoreError>
fn to_boc_extra(&self, add_crc32: bool) -> Result<Vec<u8>, TLCoreError>
fn to_boc_hex_extra(&self, add_crc32: bool) -> Result<String, TLCoreError>
fn to_boc_base64_extra(&self, add_crc32: bool) -> Result<String, TLCoreError>
Source§fn verify_prefix(reader: &mut CellParser<'_>) -> Result<(), TLCoreError>
fn verify_prefix(reader: &mut CellParser<'_>) -> Result<(), TLCoreError>
Helpers - mostly for internal use
fn write_prefix(builder: &mut CellBuilder) -> Result<(), TLCoreError>
fn cell_type(&self) -> CellType
impl StructuralPartialEq for BlockInfo
Auto Trait Implementations§
impl Freeze for BlockInfo
impl RefUnwindSafe for BlockInfo
impl Send for BlockInfo
impl Sync for BlockInfo
impl Unpin for BlockInfo
impl UnsafeUnpin for BlockInfo
impl UnwindSafe for BlockInfo
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