pub struct StateCommitment {
pub timestamp: u64,
pub overlay_root: Option<H256>,
pub state_root: H256,
}Expand description
The state commitment represents a commitment to the state machine’s state (trie) at a given height. Optionally holds a commitment to the ISMP request/response trie if supported by the state machine.
Fields§
§timestamp: u64Timestamp in seconds
overlay_root: Option<H256>Root hash of the request/response overlay trie if the state machine supports it.
state_root: H256Root hash of the global state trie.
Implementations§
Trait Implementations§
Source§impl Clone for StateCommitment
impl Clone for StateCommitment
Source§fn clone(&self) -> StateCommitment
fn clone(&self) -> StateCommitment
Returns a copy 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 moreSource§impl Debug for StateCommitment
impl Debug for StateCommitment
Source§impl Decode for StateCommitment
impl Decode for StateCommitment
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<'de> Deserialize<'de> for StateCommitment
impl<'de> Deserialize<'de> for StateCommitment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for StateCommitment
impl Encode for StateCommitment
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl Hash for StateCommitment
impl Hash for StateCommitment
Source§impl PartialEq for StateCommitment
impl PartialEq for StateCommitment
Source§impl Serialize for StateCommitment
impl Serialize for StateCommitment
Source§impl TypeInfo for StateCommitment
impl TypeInfo for StateCommitment
impl Copy for StateCommitment
impl EncodeLike for StateCommitment
impl Eq for StateCommitment
impl StructuralPartialEq for StateCommitment
Auto Trait Implementations§
impl Freeze for StateCommitment
impl RefUnwindSafe for StateCommitment
impl Send for StateCommitment
impl Sync for StateCommitment
impl Unpin for StateCommitment
impl UnwindSafe for StateCommitment
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