pub struct InputDeviceSpec { /* private fields */ }Expand description
Explicit declaration of one SCS input device.
Implementations§
Source§impl InputDeviceSpec
impl InputDeviceSpec
Sourcepub const fn new(
name: &'static str,
display_name: &'static str,
device_type: InputDeviceType,
inputs: &'static [InputSpec],
) -> Self
pub const fn new( name: &'static str, display_name: &'static str, device_type: InputDeviceType, inputs: &'static [InputSpec], ) -> Self
Creates a device declaration without the optional activity callback.
Call InputDeviceSpec::with_activity_notifications when the product
needs explicit activation and deactivation notifications.
Sourcepub const fn with_activity_notifications(self) -> Self
pub const fn with_activity_notifications(self) -> Self
Explicitly requests the optional SCS device-activity callback.
Sourcepub const fn display_name(self) -> &'static str
pub const fn display_name(self) -> &'static str
Human-facing device name.
Sourcepub const fn device_type(self) -> InputDeviceType
pub const fn device_type(self) -> InputDeviceType
Generic bindable or semantical device class.
Sourcepub const fn inputs(self) -> &'static [InputSpec]
pub const fn inputs(self) -> &'static [InputSpec]
Inputs in the exact zero-based order used by InputIndex.
Sourcepub const fn activity_notifications(self) -> bool
pub const fn activity_notifications(self) -> bool
Whether the runtime should register the optional activity callback.
Trait Implementations§
Source§impl Clone for InputDeviceSpec
impl Clone for InputDeviceSpec
Source§fn clone(&self) -> InputDeviceSpec
fn clone(&self) -> InputDeviceSpec
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 InputDeviceSpec
Source§impl Debug for InputDeviceSpec
impl Debug for InputDeviceSpec
impl Eq for InputDeviceSpec
Source§impl PartialEq for InputDeviceSpec
impl PartialEq for InputDeviceSpec
impl StructuralPartialEq for InputDeviceSpec
Auto Trait Implementations§
impl Freeze for InputDeviceSpec
impl RefUnwindSafe for InputDeviceSpec
impl Send for InputDeviceSpec
impl Sync for InputDeviceSpec
impl Unpin for InputDeviceSpec
impl UnsafeUnpin for InputDeviceSpec
impl UnwindSafe for InputDeviceSpec
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