#[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.
Trait Implementations§
Source§impl Clone for TimeEventHandlerV2
impl Clone for TimeEventHandlerV2
Source§fn clone(&self) -> TimeEventHandlerV2
fn clone(&self) -> TimeEventHandlerV2
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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
§Panics
Panics if the provided TimeEventHandlerV2
contains a Rust callback,
since only Python callbacks are supported by the legacy TimeEventHandler
.
Source§impl From<TimeEventHandlerV2> for TimeEventHandler_Py
impl From<TimeEventHandlerV2> for TimeEventHandler_Py
Source§fn from(value: TimeEventHandlerV2) -> Self
fn from(value: TimeEventHandlerV2) -> Self
§Panics
Panics if the provided TimeEventHandlerV2
contains a Rust callback,
since only Python callbacks are supported by this handler.
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
Compare self to
key
and return true
if they are equal.