#[repr(C)]pub struct SynchronizeEvent {
pub time: EventTime,
pub kind: SynchronizeKind,
pub value: i32,
/* private fields */
}
Expand description
Synchronization events are used by evdev to group events or convey other out-of-band information.
Fields§
§time: EventTime
The timestamp associated with the event.
kind: SynchronizeKind
The type of synchronization event.
value: i32
An associated value with the event.
Implementations§
Source§impl<'a> SynchronizeEvent
impl<'a> SynchronizeEvent
Sourcepub const fn new(time: EventTime, kind: SynchronizeKind, value: i32) -> Self
pub const fn new(time: EventTime, kind: SynchronizeKind, value: i32) -> Self
Creates a new event from the given code and value.
Sourcepub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self
pub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self
Reinterpret a generic event without checking for validity.
Sourcepub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self
pub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self
Reinterpret a mutable generic event without checking for validity.
Sourcepub fn into_event(self) -> InputEvent
pub fn into_event(self) -> InputEvent
A generic input event.
Sourcepub fn as_event(&self) -> &InputEvent
pub fn as_event(&self) -> &InputEvent
A generic input event reference.
Sourcepub unsafe fn as_event_mut(&mut self) -> &mut InputEvent
pub unsafe fn as_event_mut(&mut self) -> &mut InputEvent
A mutable generic input event reference.
Trait Implementations§
Source§impl AsRef<InputEvent> for SynchronizeEvent
impl AsRef<InputEvent> for SynchronizeEvent
Source§fn as_ref(&self) -> &InputEvent
fn as_ref(&self) -> &InputEvent
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<input_event> for SynchronizeEvent
impl AsRef<input_event> for SynchronizeEvent
Source§fn as_ref(&self) -> &input_event
fn as_ref(&self) -> &input_event
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for SynchronizeEvent
impl Clone for SynchronizeEvent
Source§fn clone(&self) -> SynchronizeEvent
fn clone(&self) -> SynchronizeEvent
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 SynchronizeEvent
impl Debug for SynchronizeEvent
Source§impl<'de> Deserialize<'de> for SynchronizeEvent
impl<'de> Deserialize<'de> for SynchronizeEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a SynchronizeEvent> for &'a InputEvent
impl<'a> From<&'a SynchronizeEvent> for &'a InputEvent
Source§fn from(event: &'a SynchronizeEvent) -> Self
fn from(event: &'a SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a SynchronizeEvent> for EventRef<'a>
impl<'a> From<&'a SynchronizeEvent> for EventRef<'a>
Source§fn from(event: &'a SynchronizeEvent) -> Self
fn from(event: &'a SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a SynchronizeEvent> for InputEvent
impl<'a> From<&'a SynchronizeEvent> for InputEvent
Source§fn from(event: &'a SynchronizeEvent) -> Self
fn from(event: &'a SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut SynchronizeEvent> for EventMut<'a>
impl<'a> From<&'a mut SynchronizeEvent> for EventMut<'a>
Source§fn from(event: &'a mut SynchronizeEvent) -> Self
fn from(event: &'a mut SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl From<SynchronizeEvent> for Event
impl From<SynchronizeEvent> for Event
Source§fn from(event: SynchronizeEvent) -> Self
fn from(event: SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl From<SynchronizeEvent> for InputEvent
impl From<SynchronizeEvent> for InputEvent
Source§fn from(event: SynchronizeEvent) -> Self
fn from(event: SynchronizeEvent) -> Self
Converts to this type from the input type.
Source§impl GenericEvent for SynchronizeEvent
impl GenericEvent for SynchronizeEvent
Source§fn event_kind(&self) -> EventKind
fn event_kind(&self) -> EventKind
The event kind.
Source§fn with_event(event: InputEvent) -> Result<Self, RangeError>
fn with_event(event: InputEvent) -> Result<Self, RangeError>
Interprets a generic event into a concrete event type.
Source§unsafe fn with_event_unchecked(event: InputEvent) -> Self
unsafe fn with_event_unchecked(event: InputEvent) -> Self
Interprets a generic event into a concrete event type. Read more
Source§fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>
fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>
Interprets a generic event reference into a concrete event type.
Source§fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>
fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>
Interprets a mutable generic event reference into a concrete event type.
Source§impl Hash for SynchronizeEvent
impl Hash for SynchronizeEvent
Source§impl Ord for SynchronizeEvent
impl Ord for SynchronizeEvent
Source§fn cmp(&self, other: &SynchronizeEvent) -> Ordering
fn cmp(&self, other: &SynchronizeEvent) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SynchronizeEvent
impl PartialEq for SynchronizeEvent
Source§impl PartialOrd for SynchronizeEvent
impl PartialOrd for SynchronizeEvent
Source§impl Serialize for SynchronizeEvent
impl Serialize for SynchronizeEvent
Source§impl<'a> TryFrom<&'a InputEvent> for &'a SynchronizeEvent
impl<'a> TryFrom<&'a InputEvent> for &'a SynchronizeEvent
Source§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SynchronizeEvent
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SynchronizeEvent
Source§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
Source§impl TryFrom<InputEvent> for SynchronizeEvent
impl TryFrom<InputEvent> for SynchronizeEvent
Source§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
impl Copy for SynchronizeEvent
impl Eq for SynchronizeEvent
impl StructuralPartialEq for SynchronizeEvent
Auto Trait Implementations§
impl Freeze for SynchronizeEvent
impl RefUnwindSafe for SynchronizeEvent
impl Send for SynchronizeEvent
impl Sync for SynchronizeEvent
impl Unpin for SynchronizeEvent
impl UnwindSafe for SynchronizeEvent
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