pub struct ConsumerControlsEvent {
pub pressed_buttons: Vec<ConsumerControlButton>,
}
Expand description
A ConsumerControlsEvent
represents an event where one or more consumer control buttons
were pressed.
§Example
The following ConsumerControlsEvents represents an event where the volume up button was pressed.
let volume_event = input_device::InputDeviceEvent::ConsumerControls(ConsumerControlsEvent::new(
vec![ConsumerControlButton::VOLUME_UP],
));
Fields§
Implementations§
Source§impl ConsumerControlsEvent
impl ConsumerControlsEvent
Sourcepub fn new(pressed_buttons: Vec<ConsumerControlButton>) -> Self
pub fn new(pressed_buttons: Vec<ConsumerControlButton>) -> Self
Creates a new ConsumerControlsEvent
with the relevant buttons.
§Parameters
pressed_buttons
: The buttons relevant to this event.
pub fn record_inspect(&self, node: &Node)
Trait Implementations§
Source§impl Clone for ConsumerControlsEvent
impl Clone for ConsumerControlsEvent
Source§fn clone(&self) -> ConsumerControlsEvent
fn clone(&self) -> ConsumerControlsEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConsumerControlsEvent
impl Debug for ConsumerControlsEvent
Source§impl PartialEq for ConsumerControlsEvent
impl PartialEq for ConsumerControlsEvent
impl StructuralPartialEq for ConsumerControlsEvent
Auto Trait Implementations§
impl Freeze for ConsumerControlsEvent
impl RefUnwindSafe for ConsumerControlsEvent
impl Send for ConsumerControlsEvent
impl Sync for ConsumerControlsEvent
impl Unpin for ConsumerControlsEvent
impl UnwindSafe for ConsumerControlsEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)