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>
impl<Call> Xcm<Call>
pub fn builder() -> XcmBuilder<Call, PaymentRequired>
pub fn builder_unpaid() -> XcmBuilder<Call, ExplicitUnpaidRequired>
pub fn builder_unsafe() -> XcmBuilder<Call, AnythingGoes>
Source§impl<Call> Xcm<Call>
impl<Call> Xcm<Call>
Sourcepub fn inner(&self) -> &[Instruction<Call>]
pub fn inner(&self) -> &[Instruction<Call>]
Return a reference to the inner value.
Sourcepub fn inner_mut(&mut self) -> &mut Vec<Instruction<Call>>
pub fn inner_mut(&mut self) -> &mut Vec<Instruction<Call>>
Return a mutable reference to the inner value.
Sourcepub fn into_inner(self) -> Vec<Instruction<Call>>
pub fn into_inner(self) -> Vec<Instruction<Call>>
Consume and return the inner value.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Instruction<Call>>
pub fn iter(&self) -> impl Iterator<Item = &Instruction<Call>>
Return an iterator over references to the items.
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Instruction<Call>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Instruction<Call>>
Return an iterator over mutable references to the items.
Sourcepub fn into_iter(self) -> impl Iterator<Item = Instruction<Call>>
pub fn into_iter(self) -> impl Iterator<Item = Instruction<Call>>
Consume and return an iterator over the items.
Sourcepub fn or_else(self, f: impl FnOnce() -> Xcm<Call>) -> Xcm<Call>
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
.
Sourcepub fn first(&self) -> Option<&Instruction<Call>>
pub fn first(&self) -> Option<&Instruction<Call>>
Return the first instruction, if any.
Sourcepub fn last(&self) -> Option<&Instruction<Call>>
pub fn last(&self) -> Option<&Instruction<Call>>
Return the last instruction, if any.
Sourcepub fn only(&self) -> Option<&Instruction<Call>>
pub fn only(&self) -> Option<&Instruction<Call>>
Return the only instruction, contained in Self
, iff only one exists (None
otherwise).
Sourcepub fn into_only(self) -> Result<Instruction<Call>, Xcm<Call>>
pub fn into_only(self) -> Result<Instruction<Call>, Xcm<Call>>
Return the only instruction, contained in Self
, iff only one exists (returns self
otherwise).