Trait dypdl::TransitionInterface
source · pub trait TransitionInterface {
// Required methods
fn is_applicable<T: StateInterface>(
&self,
state: &T,
registry: &TableRegistry
) -> bool;
fn apply<S: StateInterface, T: From<State>>(
&self,
state: &S,
registry: &TableRegistry
) -> T;
fn eval_cost<U: Numeric, T: StateInterface>(
&self,
cost: U,
state: &T,
registry: &TableRegistry
) -> U;
}Expand description
Trait representing a transition.
Required Methods§
sourcefn is_applicable<T: StateInterface>(
&self,
state: &T,
registry: &TableRegistry
) -> bool
fn is_applicable<T: StateInterface>( &self, state: &T, registry: &TableRegistry ) -> bool
Returns true if the transition is applicable and false otherwise.
sourcefn apply<S: StateInterface, T: From<State>>(
&self,
state: &S,
registry: &TableRegistry
) -> T
fn apply<S: StateInterface, T: From<State>>( &self, state: &S, registry: &TableRegistry ) -> T
Returns the transitioned state.
sourcefn eval_cost<U: Numeric, T: StateInterface>(
&self,
cost: U,
state: &T,
registry: &TableRegistry
) -> U
fn eval_cost<U: Numeric, T: StateInterface>( &self, cost: U, state: &T, registry: &TableRegistry ) -> U
Returns the evaluation result of the cost expression.
Object Safety§
This trait is not object safe.