Trait staging_xcm::v4::Reanchorable

source ·
pub trait Reanchorable: Sized {
    type Error: Debug;

    // Required methods
    fn reanchor(
        &mut self,
        target: &Location,
        context: &InteriorLocation,
    ) -> Result<(), ()>;
    fn reanchored(
        self,
        target: &Location,
        context: &InteriorLocation,
    ) -> Result<Self, Self::Error>;
}

Required Associated Types§

source

type Error: Debug

Type to return in case of an error.

Required Methods§

source

fn reanchor( &mut self, target: &Location, context: &InteriorLocation, ) -> 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.

source

fn reanchored( self, target: &Location, context: &InteriorLocation, ) -> 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.

Implementors§