#[repr(C)]pub struct SolutionShardCommitment {
pub root: ShardCommitmentHash,
pub proof: [ShardCommitmentHash; 20],
pub leaf: ShardCommitmentHash,
}Expand description
Information about shard commitments in the solution
Fields§
§root: ShardCommitmentHashRoot of the Merkle Tree of shard commitments
proof: [ShardCommitmentHash; 20]Proof for the shard commitment used the solution
leaf: ShardCommitmentHashShard commitment leaf used for the solution
Implementations§
Source§impl SolutionShardCommitment
impl SolutionShardCommitment
Sourcepub const NUM_LEAVES: usize = 1_048_576usize
pub const NUM_LEAVES: usize = 1_048_576usize
Number of leaves in a Merkle Tree of shard commitments
Trait Implementations§
Source§impl Clone for SolutionShardCommitment
impl Clone for SolutionShardCommitment
Source§fn clone(&self) -> SolutionShardCommitment
fn clone(&self) -> SolutionShardCommitment
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 moreSource§impl Debug for SolutionShardCommitment
impl Debug for SolutionShardCommitment
Source§impl Decode for SolutionShardCommitment
impl Decode for SolutionShardCommitment
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.
§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
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl<'de> Deserialize<'de> for SolutionShardCommitment
impl<'de> Deserialize<'de> for SolutionShardCommitment
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 SolutionShardCommitment
impl Encode for SolutionShardCommitment
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.
§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.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl MaxEncodedLen for SolutionShardCommitment
impl MaxEncodedLen for SolutionShardCommitment
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl PartialEq for SolutionShardCommitment
impl PartialEq for SolutionShardCommitment
Source§impl Serialize for SolutionShardCommitment
impl Serialize for SolutionShardCommitment
Source§impl TrivialType for SolutionShardCommitment
impl TrivialType for SolutionShardCommitment
Source§const METADATA: &[u8]
const METADATA: &[u8]
Data structure metadata in binary form, describing shape and types of the contents, see
[
IoTypeMetadataKind] for encoding details.const SIZE: u32 = _
§unsafe fn read_unaligned(bytes: &[u8]) -> Option<Self>
unsafe fn read_unaligned(bytes: &[u8]) -> Option<Self>
Read unaligned value from memory. Read more
§unsafe fn read_unaligned_unchecked(bytes: &[u8]) -> Self
unsafe fn read_unaligned_unchecked(bytes: &[u8]) -> Self
Similar to [
Self::read_unaligned()], but doesn’t do any checks at all. Read more§unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
Create a reference to a type, which is represented by provided memory. Read more
§unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
Similar to [
Self::from_bytes()], but doesn’t do any checks at all. Read more§unsafe fn from_bytes_mut(bytes: &mut [u8]) -> Option<&mut Self>
unsafe fn from_bytes_mut(bytes: &mut [u8]) -> Option<&mut Self>
Create a mutable reference to a type, which is represented by provided memory. Read more
§unsafe fn from_bytes_mut_unchecked(bytes: &mut [u8]) -> &mut Self
unsafe fn from_bytes_mut_unchecked(bytes: &mut [u8]) -> &mut Self
Similar to [
Self::from_bytes_mut()], but doesn’t do any checks at all. Read more§unsafe fn as_bytes_mut(&mut self) -> &mut [u8; { _ }]
unsafe fn as_bytes_mut(&mut self) -> &mut [u8; { _ }]
Access the underlying mutable byte representation of a data structure. Read more
Source§impl TypeInfo for SolutionShardCommitment
impl TypeInfo for SolutionShardCommitment
impl Copy for SolutionShardCommitment
impl EncodeLike for SolutionShardCommitment
impl Eq for SolutionShardCommitment
impl StructuralPartialEq for SolutionShardCommitment
Auto Trait Implementations§
impl Freeze for SolutionShardCommitment
impl RefUnwindSafe for SolutionShardCommitment
impl Send for SolutionShardCommitment
impl Sync for SolutionShardCommitment
impl Unpin for SolutionShardCommitment
impl UnwindSafe for SolutionShardCommitment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IoType for Twhere
T: TrivialType,
impl<T> IoType for Twhere
T: TrivialType,
§const METADATA: &'static [u8] = T::METADATA
const METADATA: &'static [u8] = T::METADATA
Data structure metadata in binary form, describing shape and types of the contents, see
IoTypeMetadataKind for encoding details§type PointerType = T
type PointerType = T
Pointer with trivial type that this
IoType represents§unsafe fn size_ptr(&self) -> impl Deref<Target = NonNull<u32>>
unsafe fn size_ptr(&self) -> impl Deref<Target = NonNull<u32>>
Pointer to the number of bytes that are currently used to store data. Read more
§unsafe fn size_mut_ptr(&mut self) -> impl DerefMut
unsafe fn size_mut_ptr(&mut self) -> impl DerefMut
An exclusive pointer to the number of bytes that are currently used to store data. Read more
§unsafe fn capacity_ptr(&self) -> impl Deref<Target = NonNull<u32>>
unsafe fn capacity_ptr(&self) -> impl Deref<Target = NonNull<u32>>
Number of bytes are allocated right now Read more
§unsafe fn from_ptr<'a>(
ptr: &'a NonNull<<T as IoType>::PointerType>,
size: &'a u32,
capacity: u32,
) -> impl Deref<Target = T> + 'a
unsafe fn from_ptr<'a>( ptr: &'a NonNull<<T as IoType>::PointerType>, size: &'a u32, capacity: u32, ) -> impl Deref<Target = T> + 'a
Create a reference to a type, which is represented by provided memory. Read more
§unsafe fn from_mut_ptr<'a>(
ptr: &'a mut NonNull<<T as IoType>::PointerType>,
_size: &'a mut *mut u32,
capacity: u32,
) -> impl DerefMut + 'a
unsafe fn from_mut_ptr<'a>( ptr: &'a mut NonNull<<T as IoType>::PointerType>, _size: &'a mut *mut u32, capacity: u32, ) -> impl DerefMut + 'a
Create a mutable reference to a type, which is represented by provided memory. Read more
§unsafe fn as_ptr(
&self,
) -> impl Deref<Target = NonNull<<T as IoType>::PointerType>>
unsafe fn as_ptr( &self, ) -> impl Deref<Target = NonNull<<T as IoType>::PointerType>>
Get a raw pointer to the underlying data with no checks. Read more
§unsafe fn as_mut_ptr(&mut self) -> impl DerefMut
unsafe fn as_mut_ptr(&mut self) -> impl DerefMut
Get an exclusive raw pointer to the underlying data with no checks. Read more