referrerpolicy=no-referrer-when-downgrade

Trait cumulus_primitives_core::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§

type Error: Debug

Type to return in case of an error.

Required Methods§

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>

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§