pub trait Chain: Send + Sync + 'static {
type BlockNumber: Parameter + Member + MaybeSerializeDeserialize + Hash + Copy + Default + MaybeDisplay + AtLeast32BitUnsigned + FromStr + AsPrimitive<usize>;
type Hash: Parameter + Member + MaybeSerializeDeserialize + Hash + Ord + Copy + MaybeDisplay + Default + SimpleBitOps + AsRef<[u8]> + AsMut<[u8]>;
type Hasher: HashT<Output = Self::Hash>;
type Header: Parameter + HeaderT<Number = Self::BlockNumber, Hash = Self::Hash> + MaybeSerializeDeserialize;
}
Expand description
Minimal Substrate-based chain representation that may be used from no_std environment.
Required Associated Types§
sourcetype BlockNumber: Parameter + Member + MaybeSerializeDeserialize + Hash + Copy + Default + MaybeDisplay + AtLeast32BitUnsigned + FromStr + AsPrimitive<usize>
type BlockNumber: Parameter + Member + MaybeSerializeDeserialize + Hash + Copy + Default + MaybeDisplay + AtLeast32BitUnsigned + FromStr + AsPrimitive<usize>
A type that fulfills the abstract idea of what a Substrate block number is.
sourcetype Hash: Parameter + Member + MaybeSerializeDeserialize + Hash + Ord + Copy + MaybeDisplay + Default + SimpleBitOps + AsRef<[u8]> + AsMut<[u8]>
type Hash: Parameter + Member + MaybeSerializeDeserialize + Hash + Ord + Copy + MaybeDisplay + Default + SimpleBitOps + AsRef<[u8]> + AsMut<[u8]>
A type that fulfills the abstract idea of what a Substrate hash is.
sourcetype Hasher: HashT<Output = Self::Hash>
type Hasher: HashT<Output = Self::Hash>
A type that fulfills the abstract idea of what a Substrate hasher (a type that produces hashes) is.
sourcetype Header: Parameter + HeaderT<Number = Self::BlockNumber, Hash = Self::Hash> + MaybeSerializeDeserialize
type Header: Parameter + HeaderT<Number = Self::BlockNumber, Hash = Self::Hash> + MaybeSerializeDeserialize
A type that fulfills the abstract idea of what a Substrate header is.