pub struct InputFlags(pub IoFlags);Expand description
A wrapper indicating IoFlags that should be interpreted as Input flags.
Tuple Fields§
§0: IoFlagsImplementations§
Source§impl InputFlags
impl InputFlags
Sourcepub fn from_unchecked(flags: IoFlags) -> Self
pub fn from_unchecked(flags: IoFlags) -> Self
Mark some flags as input flags, without checking if the bit pattern is sensible for an Input item.
Methods from Deref<Target = IoFlags>§
Sourcepub fn is_constant(self) -> bool
pub fn is_constant(self) -> bool
Test if this is a constant field.
Sourcepub fn is_variable(self) -> bool
pub fn is_variable(self) -> bool
Test if this is a variable field.
Sourcepub fn relative(self) -> Self
pub fn relative(self) -> Self
The field holds a relative value.
By default values are absolute.
Sourcepub fn is_relative(self) -> bool
pub fn is_relative(self) -> bool
Test if this field is relative.
Sourcepub fn is_absolute(self) -> bool
pub fn is_absolute(self) -> bool
Test if this field is absolute.
Sourcepub fn wrap(self) -> Self
pub fn wrap(self) -> Self
The value wraps around in the positive and negative directions.
By default values do not wrap.
Sourcepub fn non_linear(self) -> Self
pub fn non_linear(self) -> Self
The value is non-linear.
By default values are linear.
Sourcepub fn no_preferred_state(self) -> Self
pub fn no_preferred_state(self) -> Self
The value has no preferred state.
Preferred state means that a control will return to some state when it’s not being used. Buttons or joysticks are examples of controls with a preferred state.
By default values have a preferred state.
Sourcepub fn has_preferred_state(self) -> bool
pub fn has_preferred_state(self) -> bool
Test if this field has a preferred state.
Sourcepub fn null_state(self) -> Self
pub fn null_state(self) -> Self
The control has a null state.
A null state is a value outside the logical minimum-maximum range, used to indicate that the control is not active (such as a hat switch).
By default controls have no null position.
Sourcepub fn has_null_state(self) -> bool
pub fn has_null_state(self) -> bool
Test if this field has a null state.
Sourcepub fn volatile(self) -> Self
pub fn volatile(self) -> Self
The value is volatile.
A volatile value is one that can change without host interaction.
By default a value is non-volatile.
This flag is only used for Output or Feature items.
Sourcepub fn is_volatile(self) -> bool
pub fn is_volatile(self) -> bool
Test if this field is volatile.
Sourcepub fn buffered(self) -> Self
pub fn buffered(self) -> Self
The value is buffered.
Buffered data is not a single numeric quantity, but instead part of a stream of bytes (for example data from a barcode reader).
By default a value is a bit field.
Sourcepub fn is_buffered(self) -> bool
pub fn is_buffered(self) -> bool
Test if this field is buffered.
Sourcepub fn is_bitfield(self) -> bool
pub fn is_bitfield(self) -> bool
Test if this field is a bit field.