referrerpolicy=no-referrer-when-downgrade
collectives_westend_integration_tests::opaque

Type Alias Xcm

Source
pub type Xcm = Xcm<()>;
Expand description

The basic concrete type of Xcm, which doesn’t make any assumptions about the format of a call other than it is pre-encoded.

Aliased Type§

struct Xcm(pub Vec<Instruction<()>>);

Fields§

§0: Vec<Instruction<()>>

Implementations

Source§

impl<Call> Xcm<Call>

Source

pub fn into<C>(self) -> Xcm<C>

Source

pub fn from<C>(xcm: Xcm<C>) -> Xcm<Call>

Source§

impl<Call> Xcm<Call>

Source§

impl<Call> Xcm<Call>

Source

pub fn new() -> Xcm<Call>

Create an empty instance.

Source

pub fn is_empty(&self) -> bool

Return true if no instructions are held in self.

Source

pub fn len(&self) -> usize

Return the number of instructions held in self.

Source

pub fn inner(&self) -> &[Instruction<Call>]

Return a reference to the inner value.

Source

pub fn inner_mut(&mut self) -> &mut Vec<Instruction<Call>>

Return a mutable reference to the inner value.

Source

pub fn into_inner(self) -> Vec<Instruction<Call>>

Consume and return the inner value.

Source

pub fn iter(&self) -> impl Iterator<Item = &Instruction<Call>>

Return an iterator over references to the items.

Source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Instruction<Call>>

Return an iterator over mutable references to the items.

Source

pub fn into_iter(self) -> impl Iterator<Item = Instruction<Call>>

Consume and return an iterator over the items.

Source

pub fn or_else(self, f: impl FnOnce() -> Xcm<Call>) -> Xcm<Call>

Consume and either return self if it contains some instructions, or if it’s empty, then instead return the result of f.

Source

pub fn first(&self) -> Option<&Instruction<Call>>

Return the first instruction, if any.

Source

pub fn last(&self) -> Option<&Instruction<Call>>

Return the last instruction, if any.

Source

pub fn only(&self) -> Option<&Instruction<Call>>

Return the only instruction, contained in Self, iff only one exists (None otherwise).

Source

pub fn into_only(self) -> Result<Instruction<Call>, Xcm<Call>>

Return the only instruction, contained in Self, iff only one exists (returns self otherwise).

Trait Implementations

Source§

impl<Call> Clone for Xcm<Call>

Source§

fn clone(&self) -> Xcm<Call>

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<Call> Debug for Xcm<Call>

Source§

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

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

impl<Call> Decode for Xcm<Call>

Source§

fn decode<I>(input: &mut I) -> Result<Xcm<Call>, Error>
where I: 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<Call> Default for Xcm<Call>
where Call: Default,

Source§

fn default() -> Xcm<Call>

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

impl<Call> Encode for Xcm<Call>

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

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

Convert self to an owned vector.
Source§

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

impl<Call> From<Vec<Instruction<Call>>> for Xcm<Call>

Source§

fn from(c: Vec<Instruction<Call>>) -> Xcm<Call>

Converts to this type from the input type.
Source§

impl<Call> PartialEq for Xcm<Call>

Source§

fn eq(&self, __other: &Xcm<Call>) -> 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.
Source§

impl<Call> TryFrom<VersionedXcm<Call>> for Xcm<Call>
where Call: Decode + GetDispatchInfo,

Source§

type Error = ()

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

fn try_from(x: VersionedXcm<Call>) -> Result<Xcm<Call>, ()>

Performs the conversion.
Source§

impl<Call> TryFrom<Xcm<Call>> for Xcm<Call>

Source§

type Error = ()

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

fn try_from( old_xcm: Xcm<Call>, ) -> Result<Xcm<Call>, <Xcm<Call> as TryFrom<Xcm<Call>>>::Error>

Performs the conversion.
Source§

impl<Call> TypeInfo for Xcm<Call>
where Call: 'static,

Source§

type Identity = Xcm<Call>

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<Call> DecodeWithMemTracking for Xcm<Call>
where Vec<Instruction<Call>>: DecodeWithMemTracking,

Source§

impl<Call> EncodeLike for Xcm<Call>

Source§

impl<Call> Eq for Xcm<Call>