Type Alias bp_moonbeam::LaneId
source · pub type LaneId = HashedLaneId;
Expand description
Bridge lane identifier.
Aliased Type§
struct LaneId(/* private fields */);
Implementations
§impl HashedLaneId
impl HashedLaneId
pub const fn from_inner(inner: H256) -> 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
pub fn inner(&self) -> &H256
Access the inner lane representation.
Trait Implementations
§impl Decode for HashedLaneId
impl Decode for HashedLaneId
§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<HashedLaneId, Error>where
__CodecInputEdqy: Input,
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,
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,
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>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
§impl<'de> Deserialize<'de> for HashedLaneId
impl<'de> Deserialize<'de> for HashedLaneId
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HashedLaneId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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 Encode for HashedLaneId
impl Encode for HashedLaneId
§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
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 using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
§impl LaneIdType for HashedLaneId
impl LaneIdType for HashedLaneId
§impl MaxEncodedLen for HashedLaneId
impl MaxEncodedLen for HashedLaneId
§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
§impl Ord for HashedLaneId
impl Ord for HashedLaneId
§impl PartialEq for HashedLaneId
impl PartialEq for HashedLaneId
§impl PartialOrd for HashedLaneId
impl PartialOrd for HashedLaneId
§fn partial_cmp(&self, other: &HashedLaneId) -> Option<Ordering>
fn partial_cmp(&self, other: &HashedLaneId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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§impl Serialize for HashedLaneId
impl Serialize for HashedLaneId
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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