Skip to main content

RequirementAction

Struct RequirementAction 

Source
pub struct RequirementAction<Priority, Input, Action> { /* private fields */ }

Implementations§

Source§

impl<Priority, Input, Action> RequirementAction<Priority, Input, Action>

Source

pub fn priority(&self) -> &Priority

Source

pub fn action(&self) -> &Action

Source§

impl<State, Input, Action: IncitingAction<State, Input>> RequirementAction<Priority<State>, Input, Action>
where Action::Requirement: ActionRequirement<Priority<State>, Input>,

Source

pub fn try_new( priority: Priority<State>, action: Action, ) -> Result<RequirementAction<Priority<State>, Input, Action>, TryNewRequirementActionError<Priority<State>, Action>>

If the current state has any inputs that fit the requirement, return Some, otherwise None.

Source

pub fn select( self, value: Input, ) -> Result<Action::Resolved, RequirementActionSelectionError<Self, <<Action::Requirement as ActionRequirement<Priority<State>, Input>>::Filter as StateFilter<Priority<State>, Input>>::Error>>

Source§

impl<State, Input, IncitingAction: IncitingActionInfo<State>, Action: StackAction<State, Input, IncitingAction>> RequirementAction<PriorityStack<State, IncitingAction>, Input, Action>
where Action::Requirement: ActionRequirement<PriorityStack<State, IncitingAction>, Input>,

Source

pub fn try_new( priority: PriorityStack<State, IncitingAction>, action: Action, ) -> Result<RequirementAction<PriorityStack<State, IncitingAction>, Input, Action>, TryNewRequirementActionError<PriorityStack<State, IncitingAction>, Action>>

If the current state has any inputs that fit the requirement, return Some, otherwise None.

Source

pub fn select( self, value: Input, ) -> Result<Action::Resolved, RequirementActionSelectionError<Self, <<Action::Requirement as ActionRequirement<PriorityStack<State, IncitingAction>, Input>>::Filter as StateFilter<PriorityStack<State, IncitingAction>, Input>>::Error>>

Auto Trait Implementations§

§

impl<Priority, Input, Action> Freeze for RequirementAction<Priority, Input, Action>
where Priority: Freeze, Action: Freeze,

§

impl<Priority, Input, Action> RefUnwindSafe for RequirementAction<Priority, Input, Action>
where Priority: RefUnwindSafe, Action: RefUnwindSafe, Input: RefUnwindSafe,

§

impl<Priority, Input, Action> Send for RequirementAction<Priority, Input, Action>
where Priority: Send, Action: Send, Input: Send,

§

impl<Priority, Input, Action> Sync for RequirementAction<Priority, Input, Action>
where Priority: Sync, Action: Sync, Input: Sync,

§

impl<Priority, Input, Action> Unpin for RequirementAction<Priority, Input, Action>
where Priority: Unpin, Action: Unpin, Input: Unpin,

§

impl<Priority, Input, Action> UnwindSafe for RequirementAction<Priority, Input, Action>
where Priority: UnwindSafe, Action: UnwindSafe, Input: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StateFilterInputConversion<T> for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.