pub struct SyncFnPtr<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> SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> SyncFnPtr<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 SyncFnPtr<T>
impl<T: Clone + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Clone for SyncFnPtr<T>
Source§impl<T: Debug + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Debug for SyncFnPtr<T>
impl<T: Debug + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Debug for SyncFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Default for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Default for SyncFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Deref for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Deref for SyncFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> DerefMut for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> DerefMut for SyncFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SyncFnPtr<T>> for *const c_void
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SyncFnPtr<T>> for *const c_void
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SyncFnPtr<T>> for usize
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> From<SyncFnPtr<T>> for usize
Source§impl<T: Hash + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Hash for SyncFnPtr<T>
impl<T: Hash + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Hash for SyncFnPtr<T>
Source§impl<T: Ord + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Ord for SyncFnPtr<T>
impl<T: Ord + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Ord for SyncFnPtr<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 SyncFnPtr<T>
impl<T: PartialEq + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialEq for SyncFnPtr<T>
Source§impl<T: PartialOrd + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialOrd for SyncFnPtr<T>
impl<T: PartialOrd + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> PartialOrd for SyncFnPtr<T>
Source§impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Pointer for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Pointer for SyncFnPtr<T>
impl<T: Copy + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Copy for SyncFnPtr<T>
impl<T: Eq + Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Eq for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Send for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> StructuralPartialEq for SyncFnPtr<T>
impl<T: Pointer + Copy + Clone + Sized + Eq + PartialEq + PartialOrd + Ord + Hash + Debug> Sync for SyncFnPtr<T>
Auto Trait Implementations§
impl<T> Freeze for SyncFnPtr<T>where
T: Freeze,
impl<T> RefUnwindSafe for SyncFnPtr<T>where
T: RefUnwindSafe,
impl<T> Unpin for SyncFnPtr<T>where
T: Unpin,
impl<T> UnwindSafe for SyncFnPtr<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