Connectable

Trait Connectable 

Source
pub trait Connectable<State, Action, Target> {
    type ConnectionError;
    type Connections<'a>: IntoIterator<Item = Result<(Action, State), Self::ConnectionError>> + 'a
       where Self: 'a,
             Self::ConnectionError: 'a,
             State: 'a,
             Action: 'a,
             Target: 'a;

    // Required method
    fn connect<'a>(
        &'a self,
        from_state: State,
        to_target: &'a Target,
    ) -> Self::Connections<'a>
       where Self: 'a,
             Self::ConnectionError: 'a,
             State: 'a,
             Action: 'a,
             Target: 'a;
}
Expand description

Create actions that connect a state to a target. May produce multiple actions, each of which represents a valid connection. If no actions are produced, then a connection was not possible.

See also: Extrapolator

Required Associated Types§

Source

type ConnectionError

What kind of error can happen during connection

Source

type Connections<'a>: IntoIterator<Item = Result<(Action, State), Self::ConnectionError>> + 'a where Self: 'a, Self::ConnectionError: 'a, State: 'a, Action: 'a, Target: 'a

Required Methods§

Source

fn connect<'a>( &'a self, from_state: State, to_target: &'a Target, ) -> Self::Connections<'a>
where Self: 'a, Self::ConnectionError: 'a, State: 'a, Action: 'a, Target: 'a,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<State, Action, Target> Connectable<State, Action, Target> for ()

Source§

type ConnectionError = NoError

Source§

type Connections<'a> = [Result<(Action, State), NoError>; 0] where Action: 'a, State: 'a, Target: 'a

Source§

fn connect<'a>(&'a self, _: State, _: &'a Target) -> Self::Connections<'a>
where Self: 'a, Self::ConnectionError: 'a, State: 'a, Action: 'a, Target: 'a,

Implementors§

Source§

impl<A, W, H, X, I, S, C, Goal> Connectable<<A as Domain>::State, <A as Activity<<A as Domain>::State>>::Action, Goal> for InformedSearch<A, W, H, X, I, S, C>
where A: Domain + Activity<A::State>, A::State: Clone, C: Connectable<A::State, A::Action, Goal>, C::ConnectionError: Into<Anyhow>,

Source§

type ConnectionError = <C as Connectable<<A as Domain>::State, <A as Activity<<A as Domain>::State>>::Action, Goal>>::ConnectionError

Source§

type Connections<'a> = <C as Connectable<<A as Domain>::State, <A as Activity<<A as Domain>::State>>::Action, Goal>>::Connections<'a> where Self: 'a, Self::ConnectionError: 'a, A::State: 'a, A::Action: 'a, Goal: 'a

Source§

impl<Base, Prop, State, Action, Target> Connectable<State, Action, Target> for Chained<Base, Prop>
where Base: Connectable<State, Action, Target>, Base::ConnectionError: Into<Prop::ConnectionError>, Prop: Connectable<State, Action, Target>, State: Clone,

Source§

type ConnectionError = <Prop as Connectable<State, Action, Target>>::ConnectionError

Source§

type Connections<'a> = ChainedConnections<'a, Base, Prop, State, Action, Target> where Self: 'a, Self::ConnectionError: 'a, State: 'a, Action: 'a, Target: 'a

Source§

impl<K, Target, Action, const R: u32> Connectable<StateSE2<K, R>, Action, Target> for MergeIntoGoal<R>

Source§

type ConnectionError = DifferentialDriveLineFollowError

Source§

type Connections<'a> = Option<Result<(Action, StateSE2<K, R>), <MergeIntoGoal<R> as Connectable<StateSE2<K, R>, Action, Target>>::ConnectionError>> where K: 'a, Action: 'a, Target: 'a

Source§

impl<K, Target, Action, const R: u32> Connectable<StateSE2<K, R>, Action, Target> for SafeMergeIntoGoal<K, R>

Source§

type ConnectionError = DifferentialDriveLineFollowError

Source§

type Connections<'a> = Option<Result<(Action, StateSE2<K, R>), <SafeMergeIntoGoal<K, R> as Connectable<StateSE2<K, R>, Action, Target>>::ConnectionError>> where K: 'a, Action: 'a, Target: 'a

Source§

impl<S, G, E, R, C, State, Action, Goal> Connectable<State, Action, Goal> for LazyGraphMotion<S, G, E, R, C>
where S: KeyedSpace<G::Key>, S::Key: Borrow<G::Key>, S::State: Into<State> + Clone, State: Borrow<S::State> + Clone, G: Graph, G::Key: Clone, G::EdgeAttributes: Clone, E: Extrapolator<S::Waypoint, G::Vertex, G::EdgeAttributes, G::Key>, E::Extrapolation: Into<Action>, Action: Into<E::Extrapolation>, R: ArrivalKeyring<G::Key, G::Key, Goal>, C: Connectable<State, Action, Goal>,

Source§

type Connections<'a> = LazyGraphMotionConnections<'a, S, G, E, R, C, State, Action, Goal> where Self: 'a, Self::ConnectionError: 'a, State: 'a, Action: 'a, Goal: 'a

Source§

type ConnectionError = LazyGraphMotionError<<G as Graph>::Key, <R as ArrivalKeyring<<G as Graph>::Key, <G as Graph>::Key, Goal>>::ArrivalKeyError, <E as Extrapolator<<S as Space>::Waypoint, <G as Graph>::Vertex, <G as Graph>::EdgeAttributes, <G as Graph>::Key>>::ExtrapolationError, <C as Connectable<State, Action, Goal>>::ConnectionError>