#[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.1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InstantPtr
Available on crate feature std only.
impl PartialEq for InstantPtr
Available on crate feature
std only.Source§fn eq(&self, other: &InstantPtr) -> bool
fn eq(&self, other: &InstantPtr) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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