#[repr(C)]pub struct TimeEventHandler {
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: TimeEventThe time event.
callback: TimeEventCallbackThe callable handler for the event.
Implementations§
Source§impl TimeEventHandler
impl TimeEventHandler
Sourcepub const fn new(event: TimeEvent, callback: TimeEventCallback) -> Self
pub const fn new(event: TimeEvent, callback: TimeEventCallback) -> Self
Creates a new TimeEventHandler instance.
Trait Implementations§
Source§impl Clone for TimeEventHandler
impl Clone for TimeEventHandler
Source§fn clone(&self) -> TimeEventHandler
fn clone(&self) -> TimeEventHandler
Returns a duplicate 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 TimeEventHandler
impl Debug for TimeEventHandler
Source§impl From<TimeEventHandler> for TimeEventHandler_API
Available on crate feature python only.
impl From<TimeEventHandler> for TimeEventHandler_API
Available on crate feature
python only.Source§fn from(value: TimeEventHandler) -> Self
fn from(value: TimeEventHandler) -> Self
§Panics
Panics if the provided TimeEventHandler contains a Rust callback,
since only Python callbacks are supported by TimeEventHandler_API.
Source§impl From<TimeEventHandler> for TimeEventHandler_Py
impl From<TimeEventHandler> for TimeEventHandler_Py
Source§fn from(value: TimeEventHandler) -> Self
fn from(value: TimeEventHandler) -> Self
§Panics
Panics if the provided TimeEventHandler contains a Rust callback,
since only Python callbacks are supported by this handler.
Source§impl Ord for TimeEventHandler
impl Ord for TimeEventHandler
Source§impl PartialEq for TimeEventHandler
impl PartialEq for TimeEventHandler
Source§impl PartialOrd for TimeEventHandler
impl PartialOrd for TimeEventHandler
impl Eq for TimeEventHandler
Auto Trait Implementations§
impl Freeze for TimeEventHandler
impl !RefUnwindSafe for TimeEventHandler
impl Send for TimeEventHandler
impl Sync for TimeEventHandler
impl Unpin for TimeEventHandler
impl !UnwindSafe for TimeEventHandler
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.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