[][src]Struct input_linux::LedEvent

#[repr(C)]pub struct LedEvent {
    pub time: EventTime,
    pub led: LedKind,
    pub value: i32,
    // some fields omitted
}

An event that indicates whether the specified LED should turn on/off.

Fields

time: EventTime

The timestamp associated with the event.

led: LedKind

The led associated with the event.

value: i32

The state of the led.

Implementations

impl<'a> LedEvent[src]

pub const fn new(time: EventTime, led: LedKind, value: i32) -> Self[src]

Creates a new event from the given code and value.

pub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self[src]

Reinterpret a generic event without checking for validity.

pub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self[src]

Reinterpret a mutable generic event without checking for validity.

pub fn as_event(&self) -> &InputEvent[src]

A generic input event reference.

pub unsafe fn as_event_mut(&mut self) -> &mut InputEvent[src]

A mutable generic input event reference.

Trait Implementations

impl AsRef<InputEvent> for LedEvent[src]

impl AsRef<input_event> for LedEvent[src]

impl Clone for LedEvent[src]

impl Copy for LedEvent[src]

impl Debug for LedEvent[src]

impl Eq for LedEvent[src]

impl<'a> From<&'a LedEvent> for &'a InputEvent[src]

impl<'a> From<&'a LedEvent> for InputEvent[src]

impl<'a> From<&'a LedEvent> for EventRef<'a>[src]

impl<'a> From<&'a mut LedEvent> for EventMut<'a>[src]

impl From<LedEvent> for InputEvent[src]

impl From<LedEvent> for Event[src]

impl GenericEvent for LedEvent[src]

impl Hash for LedEvent[src]

impl Ord for LedEvent[src]

impl PartialEq<LedEvent> for LedEvent[src]

impl PartialOrd<LedEvent> for LedEvent[src]

impl StructuralEq for LedEvent[src]

impl StructuralPartialEq for LedEvent[src]

impl<'a> TryFrom<&'a InputEvent> for &'a LedEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut LedEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for LedEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.