Type Alias bp_moonbeam::LaneId

source ·
pub type LaneId = HashedLaneId;
Expand description

Bridge lane identifier.

Aliased Type§

struct LaneId(/* private fields */);

Implementations

§

impl HashedLaneId

pub const fn from_inner(inner: H256) -> HashedLaneId

Create lane identifier from given hash.

There’s no From<H256> implementation for the LaneId, because using this conversion in a wrong way (i.e. computing hash of endpoints manually) may lead to issues. So we want the call to be explicit.

pub fn inner(&self) -> &H256

Access the inner lane representation.

Trait Implementations

§

impl Clone for HashedLaneId

§

fn clone(&self) -> HashedLaneId

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 Debug for HashedLaneId

§

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

Formats the value using the given formatter. Read more
§

impl Decode for HashedLaneId

§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<HashedLaneId, 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 Default for HashedLaneId

§

fn default() -> HashedLaneId

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

impl<'de> Deserialize<'de> for HashedLaneId

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<HashedLaneId, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for HashedLaneId

§

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

Formats the value using the given formatter. Read more
§

impl Encode for HashedLaneId

§

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<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
where __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn,

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 LaneIdType for HashedLaneId

§

fn try_new<T>(endpoint1: T, endpoint2: T) -> Result<HashedLaneId, ()>
where T: Ord + Encode,

Create lane identifier from two locations.

§

impl MaxEncodedLen for HashedLaneId

§

fn max_encoded_len() -> usize

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

impl Ord for HashedLaneId

§

fn cmp(&self, other: &HashedLaneId) -> 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 + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashedLaneId

§

fn eq(&self, other: &HashedLaneId) -> 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.
§

impl PartialOrd for HashedLaneId

§

fn partial_cmp(&self, other: &HashedLaneId) -> 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

This method 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

This method 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

This method 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

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

impl Serialize for HashedLaneId

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<Vec<u8>> for HashedLaneId

§

type Error = ()

The type returned in the event of a conversion error.
§

fn try_from( value: Vec<u8>, ) -> Result<HashedLaneId, <HashedLaneId as TryFrom<Vec<u8>>>::Error>

Performs the conversion.
§

impl TypeId for HashedLaneId

§

const TYPE_ID: [u8; 4] = _

Simple 4 byte identifier.
§

impl TypeInfo for HashedLaneId

§

type Identity = HashedLaneId

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

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl Copy for HashedLaneId

§

impl EncodeLike for HashedLaneId

§

impl Eq for HashedLaneId

§

impl StructuralPartialEq for HashedLaneId