pub type ParachainBlockData = ParachainBlockData<Block>;
Aliased Type§
enum ParachainBlockData {
V0 {
block: [Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<AccountId32, ()>, RuntimeCall, MultiSignature, StorageWeightReclaim<Runtime, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>>; 1],
proof: CompactProof,
},
V1 {
blocks: Vec<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<AccountId32, ()>, RuntimeCall, MultiSignature, StorageWeightReclaim<Runtime, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>>>,
proof: CompactProof,
},
}
Variants§
V0
Fields
§
block: [Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<AccountId32, ()>, RuntimeCall, MultiSignature, StorageWeightReclaim<Runtime, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>>; 1]
§
proof: CompactProof
V1
Fields
§
blocks: Vec<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<AccountId32, ()>, RuntimeCall, MultiSignature, StorageWeightReclaim<Runtime, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>>>
§
proof: CompactProof
Implementations
Source§impl<Block> ParachainBlockData<Block>where
Block: Block,
impl<Block> ParachainBlockData<Block>where
Block: Block,
Sourcepub fn new(blocks: Vec<Block>, proof: CompactProof) -> ParachainBlockData<Block>
pub fn new(blocks: Vec<Block>, proof: CompactProof) -> ParachainBlockData<Block>
Creates a new instance of Self
.
Sourcepub fn blocks_mut(&mut self) -> &mut [Block]
pub fn blocks_mut(&mut self) -> &mut [Block]
Returns mutable references to the stored blocks.
Sourcepub fn into_blocks(self) -> Vec<Block>
pub fn into_blocks(self) -> Vec<Block>
Returns the stored blocks.
Sourcepub fn proof(&self) -> &CompactProof
pub fn proof(&self) -> &CompactProof
Returns a reference to the stored proof.
Sourcepub fn into_inner(self) -> (Vec<Block>, CompactProof)
pub fn into_inner(self) -> (Vec<Block>, CompactProof)
Deconstruct into the inner parts.
Sourcepub fn log_size_info(&self)
pub fn log_size_info(&self)
Log the size of the individual components (header, extrinsics, storage proof) as info.
Sourcepub fn as_v0(&self) -> Option<ParachainBlockData<Block>>
pub fn as_v0(&self) -> Option<ParachainBlockData<Block>>
Converts into ParachainBlockData::V0
.
Returns None
if there is not exactly one block.
Trait Implementations
Source§impl<Block> Clone for ParachainBlockData<Block>
impl<Block> Clone for ParachainBlockData<Block>
Source§fn clone(&self) -> ParachainBlockData<Block>
fn clone(&self) -> ParachainBlockData<Block>
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<Block> Decode for ParachainBlockData<Block>where
Block: Block,
impl<Block> Decode for ParachainBlockData<Block>where
Block: Block,
Source§fn decode<I>(input: &mut I) -> Result<ParachainBlockData<Block>, Error>where
I: Input,
fn decode<I>(input: &mut I) -> Result<ParachainBlockData<Block>, Error>where
I: Input,
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<Block> Encode for ParachainBlockData<Block>where
Block: Block,
impl<Block> Encode for ParachainBlockData<Block>where
Block: Block,
§fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
fn encode_to<T>(&self, dest: &mut T)where
T: Output + ?Sized,
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