pub struct ConsumerControlsEvent {
pub pressed_buttons: Vec<ConsumerControlButton>,
pub wake_lease: Option<EventPair>,
}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§
§wake_lease: Option<EventPair>Implementations§
Source§impl ConsumerControlsEvent
impl ConsumerControlsEvent
Sourcepub fn new(
pressed_buttons: Vec<ConsumerControlButton>,
wake_lease: Option<EventPair>,
) -> Self
pub fn new( pressed_buttons: Vec<ConsumerControlButton>, wake_lease: Option<EventPair>, ) -> 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§impl Debug for ConsumerControlsEvent
impl Debug for ConsumerControlsEvent
Source§impl PartialEq for ConsumerControlsEvent
impl PartialEq 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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more