Skip to main content

OutputFeatureFlags

Struct OutputFeatureFlags 

Source
pub struct OutputFeatureFlags(pub IoFlags);
Expand description

A wrapper indicating IoFlags that should be interpreted as Output or Feature flags.

Tuple Fields§

§0: IoFlags

Methods from Deref<Target = IoFlags>§

Source

pub fn into_bits(self) -> u32

Convert into bits.

Source

pub fn is_constant(self) -> bool

Test if this is a constant field.

Source

pub fn is_data(self) -> bool

Test if this is a data field.

Source

pub fn variable(self) -> Self

The field stores a variable.

By default fields store an array.

Source

pub fn is_variable(self) -> bool

Test if this is a variable field.

Source

pub fn is_array(self) -> bool

Test if this is an array field.

Source

pub fn relative(self) -> Self

The field holds a relative value.

By default values are absolute.

Source

pub fn is_relative(self) -> bool

Test if this field is relative.

Source

pub fn is_absolute(self) -> bool

Test if this field is absolute.

Source

pub fn wrap(self) -> Self

The value wraps around in the positive and negative directions.

By default values do not wrap.

Source

pub fn wraps(self) -> bool

Test if this field wraps.

Source

pub fn non_linear(self) -> Self

The value is non-linear.

By default values are linear.

Source

pub fn is_linear(self) -> bool

Test if this field is linear.

Source

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.

Source

pub fn has_preferred_state(self) -> bool

Test if this field has a preferred state.

Source

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.

Source

pub fn has_null_state(self) -> bool

Test if this field has a null state.

Source

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.

Source

pub fn is_volatile(self) -> bool

Test if this field is volatile.

Source

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.

Source

pub fn is_buffered(self) -> bool

Test if this field is buffered.

Source

pub fn is_bitfield(self) -> bool

Test if this field is a bit field.

Trait Implementations§

Source§

impl Clone for OutputFeatureFlags

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for OutputFeatureFlags

Source§

impl Debug for OutputFeatureFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for OutputFeatureFlags

Source§

type Target = IoFlags

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<IoFlags> for OutputFeatureFlags

Source§

fn from(flags: IoFlags) -> Self

Convert an IoFlags value.

Note that unline InputFlags, all IoFlags values are valid Output or Feature flags.

Source§

impl PartialEq for OutputFeatureFlags

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OutputFeatureFlags

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.