pub enum InputValue {
Bool(bool),
Float(InputAxisValue),
}Expand description
Safe event value returned by an application input provider.
Float events require a validated InputAxisValue; an arbitrary raw float
cannot cross the safe application boundary.
ⓘ
use scs_sdk::input::InputValue;
let _invalid = InputValue::Float(-2.0);Variants§
Bool(bool)
Float(InputAxisValue)
One normalized float axis. Arbitrary f32 values must first pass
InputAxisValue::new, so every safe event is finite and in range.
Implementations§
Source§impl InputValue
impl InputValue
pub const fn value_type(self) -> InputValueType
Trait Implementations§
Source§impl Clone for InputValue
impl Clone for InputValue
Source§fn clone(&self) -> InputValue
fn clone(&self) -> InputValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InputValue
Source§impl Debug for InputValue
impl Debug for InputValue
Source§impl PartialEq for InputValue
impl PartialEq for InputValue
impl StructuralPartialEq for InputValue
Auto Trait Implementations§
impl Freeze for InputValue
impl RefUnwindSafe for InputValue
impl Send for InputValue
impl Sync for InputValue
impl Unpin for InputValue
impl UnsafeUnpin for InputValue
impl UnwindSafe for InputValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more