Trait xcm_simulator::Reanchorable
pub trait Reanchorable: Sized {
type Error: Debug;
// Required methods
fn reanchor(
&mut self,
target: &Location,
context: &Junctions,
) -> Result<(), ()>;
fn reanchored(
self,
target: &Location,
context: &Junctions,
) -> Result<Self, Self::Error>;
}
Required Associated Types§
Required Methods§
fn reanchor(&mut self, target: &Location, context: &Junctions) -> Result<(), ()>
fn reanchor(&mut self, target: &Location, context: &Junctions) -> Result<(), ()>
Mutate self
so that it represents the same location from the point of view of target
.
The context of self
is provided as context
.
Does not modify self
in case of overflow.
fn reanchored(
self,
target: &Location,
context: &Junctions,
) -> Result<Self, Self::Error>
fn reanchored( self, target: &Location, context: &Junctions, ) -> Result<Self, Self::Error>
Consume self
and return a new value representing the same location from the point of view
of target
. The context of self
is provided as context
.
Returns the original self
in case of overflow.
Object Safety§
This trait is not object safe.