pub struct StateProofHeader {
pub proof_type: StateProofType,
pub slot: u64,
pub path_bitset: TnHash,
}Expand description
State proof header
Fields§
§proof_type: StateProofType§slot: u64§path_bitset: TnHashImplementations§
Source§impl StateProofHeader
impl StateProofHeader
Sourcepub fn new(proof_type: StateProofType, slot: u64, path_bitset: TnHash) -> Self
pub fn new(proof_type: StateProofType, slot: u64, path_bitset: TnHash) -> Self
Create a new state proof header
Sourcepub fn encode_type_slot(&self) -> u64
pub fn encode_type_slot(&self) -> u64
Encode type and slot into type_slot field
Sourcepub fn decode_type_slot(type_slot: u64) -> (StateProofType, u64)
pub fn decode_type_slot(type_slot: u64) -> (StateProofType, u64)
Decode type_slot field into type and slot
Trait Implementations§
Source§impl Clone for StateProofHeader
impl Clone for StateProofHeader
Source§fn clone(&self) -> StateProofHeader
fn clone(&self) -> StateProofHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StateProofHeader
impl RefUnwindSafe for StateProofHeader
impl Send for StateProofHeader
impl Sync for StateProofHeader
impl Unpin for StateProofHeader
impl UnwindSafe for StateProofHeader
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