[][src]Struct prongs::types::ProcessingResult

pub struct ProcessingResult<TUserAction> where
    TUserAction: Clone + Serialize
{ pub action: TUserAction, pub player_id: Option<usize>, pub cause: Option<InputCause>, }

The result of a successful input processing by a Schema

Fields

The user defined action to be performed based on the input event

The player_id if assigned to the Schema previously, otherwise None

The InputCause of this input, if known. None only if backend implementation is incomplete.

Methods

impl<TUserAction> ProcessingResult<TUserAction> where
    TUserAction: Clone + Serialize
[src]

Specifies if the input cause is engaged (pressed or not equal to 0) NOTE: some input causes are never engaged, e.g. Motion

Specifies if the input cause is an axis

Reduces the input cause state value to a single f64 Key or button states are either 0.0 or 1.0 for pressed Axis value stays same Motion x, y values are multiplied (x * y)

Trait Implementations

impl<TUserAction: PartialEq> PartialEq<ProcessingResult<TUserAction>> for ProcessingResult<TUserAction> where
    TUserAction: Clone + Serialize
[src]

impl<TUserAction: Debug> Debug for ProcessingResult<TUserAction> where
    TUserAction: Clone + Serialize
[src]

Auto Trait Implementations

impl<TUserAction> Send for ProcessingResult<TUserAction> where
    TUserAction: Send

impl<TUserAction> Sync for ProcessingResult<TUserAction> where
    TUserAction: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]