[−][src]Struct prongs::types::ProcessingResult
The result of a successful input processing by a Schema
Fields
action: TUserAction
The user defined action to be performed based on the input event
player_id: Option<usize>
The player_id if assigned to the Schema previously, otherwise None
cause: Option<InputCause>
The InputCause of this input, if known. None only if backend implementation is incomplete.
Methods
impl<TUserAction> ProcessingResult<TUserAction> where
TUserAction: Clone + Serialize,
[src]
impl<TUserAction> ProcessingResult<TUserAction> where
TUserAction: Clone + Serialize,
pub fn input_is_engaged(&self) -> bool
[src]
pub fn input_is_engaged(&self) -> bool
Specifies if the input cause is engaged (pressed or not equal to 0) NOTE: some input causes are never engaged, e.g. Motion
pub fn input_is_axis(&self) -> bool
[src]
pub fn input_is_axis(&self) -> bool
Specifies if the input cause is an axis
pub fn input_scalar_value(&self) -> f64
[src]
pub fn input_scalar_value(&self) -> f64
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: PartialEq> PartialEq<ProcessingResult<TUserAction>> for ProcessingResult<TUserAction> where
TUserAction: Clone + Serialize,
fn eq(&self, other: &ProcessingResult<TUserAction>) -> bool
[src]
fn eq(&self, other: &ProcessingResult<TUserAction>) -> bool
fn ne(&self, other: &ProcessingResult<TUserAction>) -> bool
[src]
fn ne(&self, other: &ProcessingResult<TUserAction>) -> bool
impl<TUserAction: Debug> Debug for ProcessingResult<TUserAction> where
TUserAction: Clone + Serialize,
[src]
impl<TUserAction: Debug> Debug for ProcessingResult<TUserAction> where
TUserAction: Clone + Serialize,
Auto Trait Implementations
impl<TUserAction> Send for ProcessingResult<TUserAction> where
TUserAction: Send,
impl<TUserAction> Send for ProcessingResult<TUserAction> where
TUserAction: Send,
impl<TUserAction> Sync for ProcessingResult<TUserAction> where
TUserAction: Sync,
impl<TUserAction> Sync for ProcessingResult<TUserAction> where
TUserAction: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T