pub trait ActivityModifier<State, FromAction> {
type ModifiedAction;
type ModifiedActionError;
type ModifiedChoices<'a>: IntoIterator<Item = Result<(Self::ModifiedAction, State), Self::ModifiedActionError>>
where Self: 'a,
Self::ModifiedAction: 'a,
Self::ModifiedActionError: 'a,
State: 'a,
FromAction: 'a;
// Required method
fn modify_action<'a>(
&'a self,
from_state: State,
from_action: FromAction,
to_state: State,
) -> Self::ModifiedChoices<'a>
where FromAction: 'a,
State: 'a;
}Expand description
The ActivityModifier can be used to change the behaviors of an activity, e.g. by enforcing constraints.
Required Associated Types§
Sourcetype ModifiedAction
type ModifiedAction
What kind of action can be output by this modifier
Sourcetype ModifiedActionError
type ModifiedActionError
What kind of error can happen for this modifier
type ModifiedChoices<'a>: IntoIterator<Item = Result<(Self::ModifiedAction, State), Self::ModifiedActionError>> where Self: 'a, Self::ModifiedAction: 'a, Self::ModifiedActionError: 'a, State: 'a, FromAction: 'a
Required Methods§
fn modify_action<'a>(
&'a self,
from_state: State,
from_action: FromAction,
to_state: State,
) -> Self::ModifiedChoices<'a>where
FromAction: 'a,
State: '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.