pub struct LineEvent(/* private fields */);
Expand description
Information about a change to the state of a Line
Wraps kernel struct gpioevent_data
.
Implementations§
source§impl LineEvent
impl LineEvent
sourcepub fn timestamp(&self) -> u64
pub fn timestamp(&self) -> u64
Best estimate of event occurrence time, in nanoseconds
In most cases, the timestamp for the event is captured in an interrupt handler so it should be very accurate.
The nanosecond timestamp value should are captured
using the CLOCK_MONOTONIC
offsets in the kernel and
should be compared against CLOCK_MONOTONIC
values.
Note that kernel versions prior to 5.7 used
CLOCK_REALTIME
offsets instead.
sourcepub fn event_type(&self) -> EventType
pub fn event_type(&self) -> EventType
Was this a rising or a falling edge?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineEvent
impl RefUnwindSafe for LineEvent
impl Send for LineEvent
impl Sync for LineEvent
impl Unpin for LineEvent
impl UnwindSafe for LineEvent
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