#[repr(C)]pub struct TimeEventHandlerV2 {
pub event: TimeEvent,
pub callback: TimeEventCallback,
}
Expand description
Represents a time event and its associated handler.
TimeEventHandler
associates a TimeEvent
with a callback function that is triggered
when the event’s timestamp is reached.
Fields§
§event: TimeEvent
The time event.
callback: TimeEventCallback
The callable handler for the event.
Implementations§
Source§impl TimeEventHandlerV2
impl TimeEventHandlerV2
Sourcepub const fn new(event: TimeEvent, callback: TimeEventCallback) -> Self
pub const fn new(event: TimeEvent, callback: TimeEventCallback) -> Self
Creates a new TimeEventHandlerV2
instance.
pub fn run(self)
Trait Implementations§
Source§impl Clone for TimeEventHandlerV2
impl Clone for TimeEventHandlerV2
Source§fn clone(&self) -> TimeEventHandlerV2
fn clone(&self) -> TimeEventHandlerV2
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 TimeEventHandlerV2
impl Debug for TimeEventHandlerV2
Source§impl From<TimeEventHandlerV2> for TimeEventHandler
impl From<TimeEventHandlerV2> for TimeEventHandler
Source§fn from(value: TimeEventHandlerV2) -> Self
fn from(value: TimeEventHandlerV2) -> Self
Converts to this type from the input type.
Source§impl From<TimeEventHandlerV2> for TimeEventHandler_Py
impl From<TimeEventHandlerV2> for TimeEventHandler_Py
Source§fn from(value: TimeEventHandlerV2) -> Self
fn from(value: TimeEventHandlerV2) -> Self
Converts to this type from the input type.
Source§impl Ord for TimeEventHandlerV2
impl Ord for TimeEventHandlerV2
Source§impl PartialEq for TimeEventHandlerV2
impl PartialEq for TimeEventHandlerV2
Source§impl PartialOrd for TimeEventHandlerV2
impl PartialOrd for TimeEventHandlerV2
impl Eq for TimeEventHandlerV2
Auto Trait Implementations§
impl Freeze for TimeEventHandlerV2
impl !RefUnwindSafe for TimeEventHandlerV2
impl Send for TimeEventHandlerV2
impl Sync for TimeEventHandlerV2
impl Unpin for TimeEventHandlerV2
impl !UnwindSafe for TimeEventHandlerV2
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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