Validator

Struct Validator 

Source
pub struct Validator<State, Input, Filter: StateFilter<State, Input>> { /* private fields */ }

Implementations§

Source§

impl<State, Input, Filter: StateFilter<State, Input>> Validator<State, Input, Filter>

Source

pub fn try_new(state: State, input: Input) -> Result<Self, Filter::Error>

Source

pub fn execute<Action: ValidAction<State, Input, Filter = Filter>>( self, valid_action: Action, ) -> Action::Output

Auto Trait Implementations§

§

impl<State, Input, Filter> Freeze for Validator<State, Input, Filter>
where State: Freeze, <Filter as StateFilter<State, Input>>::ValidOutput: Freeze,

§

impl<State, Input, Filter> RefUnwindSafe for Validator<State, Input, Filter>
where State: RefUnwindSafe, <Filter as StateFilter<State, Input>>::ValidOutput: RefUnwindSafe, Input: RefUnwindSafe, Filter: RefUnwindSafe,

§

impl<State, Input, Filter> Send for Validator<State, Input, Filter>
where State: Send, <Filter as StateFilter<State, Input>>::ValidOutput: Send, Input: Send, Filter: Send,

§

impl<State, Input, Filter> Sync for Validator<State, Input, Filter>
where State: Sync, <Filter as StateFilter<State, Input>>::ValidOutput: Sync, Input: Sync, Filter: Sync,

§

impl<State, Input, Filter> Unpin for Validator<State, Input, Filter>
where State: Unpin, <Filter as StateFilter<State, Input>>::ValidOutput: Unpin, Input: Unpin, Filter: Unpin,

§

impl<State, Input, Filter> UnwindSafe for Validator<State, Input, Filter>
where State: UnwindSafe, <Filter as StateFilter<State, Input>>::ValidOutput: UnwindSafe, Input: UnwindSafe, Filter: 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.