referrerpolicy=no-referrer-when-downgrade
pallet_bridge_grandpa

Type Alias BridgedBlockId

Source
pub type BridgedBlockId<T, I> = HeaderId<BridgedBlockHash<T, I>, BridgedBlockNumber<T, I>>;
Expand description

Block id of the bridged chain.

Aliased Type§

struct BridgedBlockId<T, I>(pub <<T as Config<I>>::BridgedChain as Chain>::BlockNumber, pub <<T as Config<I>>::BridgedChain as Chain>::Hash);

Fields§

§0: <<T as Config<I>>::BridgedChain as Chain>::BlockNumber§1: <<T as Config<I>>::BridgedChain as Chain>::Hash

Implementations

§

impl<Hash, Number> HeaderId<Hash, Number>
where Hash: Copy, Number: Copy,

pub fn number(&self) -> Number

Return header number.

pub fn hash(&self) -> Hash

Return header hash.

Trait Implementations

§

impl<Hash, Number> Clone for HeaderId<Hash, Number>
where Hash: Clone, Number: Clone,

§

fn clone(&self) -> HeaderId<Hash, Number>

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
§

impl<Hash, Number> Debug for HeaderId<Hash, Number>
where Hash: Debug, Number: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<Hash, Number> Decode for HeaderId<Hash, Number>
where Number: Decode, Hash: Decode,

§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<HeaderId<Hash, Number>, Error>
where __CodecInputEdqy: 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,

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,

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

fn encoded_fixed_size() -> Option<usize>

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

impl<Hash, Number> Default for HeaderId<Hash, Number>
where Hash: Default, Number: Default,

§

fn default() -> HeaderId<Hash, Number>

Returns the “default value” for a type. Read more
§

impl<Hash, Number> Encode for HeaderId<Hash, Number>
where Number: Encode, Hash: Encode,

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

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

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

Convert self to an owned vector.
§

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.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl<Hash, Number> Hash for HeaderId<Hash, Number>
where Hash: Hash, Number: Hash,

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<Hash, Number> MaxEncodedLen for HeaderId<Hash, Number>
where Number: MaxEncodedLen, Hash: MaxEncodedLen,

§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
§

impl<Hash, Number> Ord for HeaderId<Hash, Number>
where Hash: Ord, Number: Ord,

§

fn cmp(&self, other: &HeaderId<Hash, Number>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl<Hash, Number> PartialEq for HeaderId<Hash, Number>
where Hash: PartialEq, Number: PartialEq,

§

fn eq(&self, other: &HeaderId<Hash, Number>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

impl<Hash, Number> PartialOrd for HeaderId<Hash, Number>
where Hash: PartialOrd, Number: PartialOrd,

§

fn partial_cmp(&self, other: &HeaderId<Hash, Number>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl<Hash, Number> TypeInfo for HeaderId<Hash, Number>
where Number: TypeInfo + 'static, Hash: TypeInfo + 'static,

§

type Identity = HeaderId<Hash, Number>

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl<Hash, Number> Copy for HeaderId<Hash, Number>
where Hash: Copy, Number: Copy,

§

impl<Hash, Number> EncodeLike for HeaderId<Hash, Number>
where Number: Encode, Hash: Encode,

§

impl<Hash, Number> Eq for HeaderId<Hash, Number>
where Hash: Eq, Number: Eq,

§

impl<Hash, Number> StructuralPartialEq for HeaderId<Hash, Number>