pub struct SendFnPtr<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug>(/* private fields */);Implementations§
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> SendFnPtr<T>
Sourcepub const fn inner(&self) -> Option<T>
pub const fn inner(&self) -> Option<T>
Returns the inner representation of the wrapper If the option is None then this wrapper was a null pointer.
Sourcepub const fn unwrap(&self) -> T
pub const fn unwrap(&self) -> T
Unwraps the wrapper returning the raw function pointer
§Panics
If the wrapper represents a null pointer
Sourcepub const fn as_address(&self) -> usize
pub const fn as_address(&self) -> usize
Returns the address of the function pointer.
This is equivalent to doing raw_fn_ptr as usize with the exception
that this function will return 0usize for a null pointer.
Sourcepub const fn as_raw_ptr(&self) -> *const c_void
pub const fn as_raw_ptr(&self) -> *const c_void
Returns the raw pointer representation of the function pointer.
This is equivalent to doing raw_fn_ptr as *const c_void with the exception
that this function will return null for a null pointer.
Trait Implementations§
Source§impl<T: Clone + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Clone for SendFnPtr<T>
impl<T: Clone + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Clone for SendFnPtr<T>
Source§impl<T: Debug + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Debug for SendFnPtr<T>
impl<T: Debug + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Debug for SendFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Default for SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Default for SendFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Deref for SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Deref for SendFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> DerefMut for SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> DerefMut for SendFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SendFnPtr<T>> for *const c_void
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SendFnPtr<T>> for *const c_void
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SendFnPtr<T>> for usize
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SendFnPtr<T>> for usize
Source§impl<T: Hash + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Hash for SendFnPtr<T>
impl<T: Hash + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Hash for SendFnPtr<T>
Source§impl<T: Ord + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Ord for SendFnPtr<T>
impl<T: Ord + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Ord for SendFnPtr<T>
1.21.0 · 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<T: PartialEq + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialEq for SendFnPtr<T>
impl<T: PartialEq + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialEq for SendFnPtr<T>
Source§impl<T: PartialOrd + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialOrd for SendFnPtr<T>
impl<T: PartialOrd + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialOrd for SendFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Pointer for SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Pointer for SendFnPtr<T>
impl<T: Copy + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Copy for SendFnPtr<T>
impl<T: Eq + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Eq for SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Send for SendFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> StructuralPartialEq for SendFnPtr<T>
Auto Trait Implementations§
impl<T> Freeze for SendFnPtr<T>where
T: Freeze,
impl<T> RefUnwindSafe for SendFnPtr<T>where
T: RefUnwindSafe,
impl<T> Sync for SendFnPtr<T>where
T: Sync,
impl<T> Unpin for SendFnPtr<T>where
T: Unpin,
impl<T> UnwindSafe for SendFnPtr<T>where
T: UnwindSafe,
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