#[repr(C)]pub struct InstantPtr {
pub ptr: Box<Instant>,
pub clone_fn: InstantPtrCloneCallback,
pub destructor: InstantPtrDestructorCallback,
pub run_destructor: bool,
}Expand description
FFI-safe wrapper around std::time::Instant with custom clone/drop callbacks.
Allows crossing FFI boundaries while maintaining proper memory management.
Fields§
§ptr: Box<Instant>§clone_fn: InstantPtrCloneCallback§destructor: InstantPtrDestructorCallback§run_destructor: boolTrait Implementations§
Source§impl Clone for InstantPtr
impl Clone for InstantPtr
Source§impl Debug for InstantPtr
Available on crate feature std only.
impl Debug for InstantPtr
Available on crate feature
std only.Source§impl Drop for InstantPtr
impl Drop for InstantPtr
Source§impl From<Instant> for InstantPtr
Available on crate feature std only.
impl From<Instant> for InstantPtr
Available on crate feature
std only.Source§fn from(s: StdInstant) -> InstantPtr
fn from(s: StdInstant) -> InstantPtr
Converts to this type from the input type.
Source§impl From<InstantPtr> for Instant
Available on crate feature std only.
impl From<InstantPtr> for Instant
Available on crate feature
std only.Source§fn from(s: InstantPtr) -> StdInstant
fn from(s: InstantPtr) -> StdInstant
Converts to this type from the input type.
Source§impl Hash for InstantPtr
Available on crate feature std only.
impl Hash for InstantPtr
Available on crate feature
std only.Source§impl Ord for InstantPtr
Available on crate feature std only.
impl Ord for InstantPtr
Available on crate feature
std only.Source§impl PartialEq for InstantPtr
Available on crate feature std only.
impl PartialEq for InstantPtr
Available on crate feature
std only.Source§impl PartialOrd for InstantPtr
Available on crate feature std only.
impl PartialOrd for InstantPtr
Available on crate feature
std only.impl Eq for InstantPtr
Auto Trait Implementations§
impl Freeze for InstantPtr
impl RefUnwindSafe for InstantPtr
impl Send for InstantPtr
impl Sync for InstantPtr
impl Unpin for InstantPtr
impl UnwindSafe for InstantPtr
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,
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