Trait sp_runtime::traits::Block [−][src]
Something which fulfills the abstract idea of a Substrate block. It has types for
Extrinsic
pieces of information as well as a Header
.
You can get an iterator over each of the extrinsics
and retrieve the header
.
Associated Types
type Extrinsic: Member + Codec + Extrinsic + MaybeSerialize + MaybeMallocSizeOf
[src]
Type for extrinsics.
type Header: Header<Hash = Self::Hash> + MaybeMallocSizeOf
[src]
Header type.
type Hash: Member + MaybeSerializeDeserialize + Debug + Hash + Ord + Copy + MaybeDisplay + Default + SimpleBitOps + Codec + AsRef<[u8]> + AsMut<[u8]> + MaybeMallocSizeOf
[src]
Block hash type.
Required methods
fn header(&self) -> &Self::Header
[src]
Returns a reference to the header.
fn extrinsics(&self) -> &[Self::Extrinsic]ⓘ
[src]
Returns a reference to the list of extrinsics.
fn deconstruct(self) -> (Self::Header, Vec<Self::Extrinsic>)
[src]
Split the block into header and list of extrinsics.
fn new(header: Self::Header, extrinsics: Vec<Self::Extrinsic>) -> Self
[src]
Creates new block from header and extrinsics.
fn encode_from(header: &Self::Header, extrinsics: &[Self::Extrinsic]) -> Vec<u8>
[src]
Creates an encoded block from the given header
and extrinsics
without requiring the
creation of an instance.
Provided methods
Loading content...Implementors
impl<Header, Extrinsic: MaybeSerialize> Block for sp_runtime::generic::Block<Header, Extrinsic> where
Header: HeaderT,
Extrinsic: Member + Codec + Extrinsic + MaybeMallocSizeOf,
[src]
Header: HeaderT,
Extrinsic: Member + Codec + Extrinsic + MaybeMallocSizeOf,