Type Alias pallet_xcm_bridge::pallet::BridgeOf

source ·
pub type BridgeOf<T, I> = Bridge<ThisChainOf<T, I>, LaneIdOf<T, I>>;
Expand description

An alias for the bridge metadata.

Aliased Type§

struct BridgeOf<T, I> {
    pub bridge_origin_relative_location: Box<VersionedLocation>,
    pub bridge_origin_universal_location: Box<VersionedInteriorLocation>,
    pub bridge_destination_universal_location: Box<VersionedInteriorLocation>,
    pub state: BridgeState,
    pub deposit: Option<Deposit<<<T as Config<<T as Config<I>>::BridgeMessagesPalletInstance>>::ThisChain as Chain>::AccountId, <<T as Config<<T as Config<I>>::BridgeMessagesPalletInstance>>::ThisChain as Chain>::Balance>>,
    pub lane_id: <T as Config<<T as Config<I>>::BridgeMessagesPalletInstance>>::LaneId,
    pub maybe_notify: Option<Receiver>,
}

Fields§

§bridge_origin_relative_location: Box<VersionedLocation>

Relative location of the bridge origin chain. This is expected to be convertible to the latest XCM, so the check and migration needs to be ensured.

§bridge_origin_universal_location: Box<VersionedInteriorLocation>

See BridgeLocations::bridge_origin_universal_location. Stored for BridgeId sanity check.

§bridge_destination_universal_location: Box<VersionedInteriorLocation>

See BridgeLocations::bridge_destination_universal_location. Stored for BridgeId sanity check.

§state: BridgeState

Current bridge state.

§deposit: Option<Deposit<<<T as Config<<T as Config<I>>::BridgeMessagesPalletInstance>>::ThisChain as Chain>::AccountId, <<T as Config<<T as Config<I>>::BridgeMessagesPalletInstance>>::ThisChain as Chain>::Balance>>

Reserved amount on the sovereign account of the sibling bridge origin. The account is derived from self.bridge_origin_relative_location.

§lane_id: <T as Config<<T as Config<I>>::BridgeMessagesPalletInstance>>::LaneId

Mapping to the unique LaneId.

§maybe_notify: Option<Receiver>

Holds data about the bridge_origin_relative_location where notifications can be sent for handling congestion.

Trait Implementations

source§

impl<ThisChain, LaneId> Clone for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType,

source§

fn clone(&self) -> Bridge<ThisChain, LaneId>

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

impl<ThisChain, LaneId> Debug for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType,

source§

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

Formats the value using the given formatter. Read more
source§

impl<ThisChain, LaneId> Decode for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType + Decode, Option<Deposit<<ThisChain as Chain>::AccountId, <ThisChain as Chain>::Balance>>: Decode,

source§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Bridge<ThisChain, LaneId>, 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
source§

impl<ThisChain, LaneId> Encode for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType + Encode, Option<Deposit<<ThisChain as Chain>::AccountId, <ThisChain as Chain>::Balance>>: Encode,

source§

fn size_hint(&self) -> usize

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

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

impl<ThisChain, LaneId> MaxEncodedLen for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType + MaxEncodedLen, Option<Deposit<<ThisChain as Chain>::AccountId, <ThisChain as Chain>::Balance>>: MaxEncodedLen,

source§

fn max_encoded_len() -> usize

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

impl<ThisChain, LaneId> PartialEq for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType,

source§

fn eq(&self, other: &Bridge<ThisChain, LaneId>) -> 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.
source§

impl<ThisChain, LaneId> TypeInfo for Bridge<ThisChain, LaneId>
where ThisChain: Chain + 'static, LaneId: LaneIdType + TypeInfo + 'static, Option<Deposit<<ThisChain as Chain>::AccountId, <ThisChain as Chain>::Balance>>: TypeInfo + 'static,

§

type Identity = Bridge<ThisChain, LaneId>

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

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl<ThisChain, LaneId> EncodeLike for Bridge<ThisChain, LaneId>
where ThisChain: Chain, LaneId: LaneIdType + Encode, Option<Deposit<<ThisChain as Chain>::AccountId, <ThisChain as Chain>::Balance>>: Encode,

source§

impl<ThisChain, LaneId> Eq for Bridge<ThisChain, LaneId>
where ThisChain: Eq + Chain, LaneId: Eq + LaneIdType,