Type Alias sc_network_common::sync::message::BlockData

source ·
pub type BlockData<B> = BlockData<<B as BlockT>::Header, <B as BlockT>::Hash, <B as BlockT>::Extrinsic>;
Expand description

Type alias for using the BlockData type using block type parameters.

Aliased Type§

struct BlockData<B> {
    pub hash: <B as Block>::Hash,
    pub header: Option<<B as Block>::Header>,
    pub body: Option<Vec<<B as Block>::Extrinsic>>,
    pub indexed_body: Option<Vec<Vec<u8>>>,
    pub receipt: Option<Vec<u8>>,
    pub message_queue: Option<Vec<u8>>,
    pub justification: Option<Vec<u8>>,
    pub justifications: Option<Justifications>,
}

Fields§

§hash: <B as Block>::Hash

Block header hash.

§header: Option<<B as Block>::Header>

Block header if requested.

§body: Option<Vec<<B as Block>::Extrinsic>>

Block body if requested.

§indexed_body: Option<Vec<Vec<u8>>>

Block body indexed transactions if requested.

§receipt: Option<Vec<u8>>

Block receipt if requested.

§message_queue: Option<Vec<u8>>

Block message queue if requested.

§justification: Option<Vec<u8>>

Justification if requested.

§justifications: Option<Justifications>

Justifications if requested.

Trait Implementations

source§

impl<Header: Clone, Hash: Clone, Extrinsic: Clone> Clone for BlockData<Header, Hash, Extrinsic>

source§

fn clone(&self) -> BlockData<Header, Hash, Extrinsic>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Header: Debug, Hash: Debug, Extrinsic: Debug> Debug for BlockData<Header, Hash, Extrinsic>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Header, Hash, Extrinsic> Decode for BlockData<Header, Hash, Extrinsic>
where Hash: Decode, Option<Header>: Decode, Option<Vec<Extrinsic>>: Decode,

source§

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,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<Header, Hash, Extrinsic> Encode for BlockData<Header, Hash, Extrinsic>
where Hash: Encode, Option<Header>: Encode, Option<Vec<Extrinsic>>: Encode,

source§

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, )

Convert self to a slice and append it to the destination.
source§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
source§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
source§

impl<Header: PartialEq, Hash: PartialEq, Extrinsic: PartialEq> PartialEq for BlockData<Header, Hash, Extrinsic>

source§

fn eq(&self, other: &BlockData<Header, Hash, Extrinsic>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Header, Hash, Extrinsic> EncodeLike for BlockData<Header, Hash, Extrinsic>
where Hash: Encode, Option<Header>: Encode, Option<Vec<Extrinsic>>: Encode,

source§

impl<Header: Eq, Hash: Eq, Extrinsic: Eq> Eq for BlockData<Header, Hash, Extrinsic>

source§

impl<Header, Hash, Extrinsic> StructuralPartialEq for BlockData<Header, Hash, Extrinsic>