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§
Sourcetype ConnectionError
type ConnectionError
What kind of error can happen during connection
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§
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.