pub struct PayloadPointer<T: ?Sized + Pointee> { /* private fields */ }Implementations§
Source§impl<T: ?Sized + Pointee> PayloadPointer<T>
impl<T: ?Sized + Pointee> PayloadPointer<T>
Sourcepub const fn metadata_of(self) -> T::Metadata
pub const fn metadata_of(self) -> T::Metadata
Returns the metadata of the pointee.
pub fn addr(self) -> usize
pub fn as_ptr(self) -> NonNull<T>where
T: Sized,
Sourcepub unsafe fn deref<P: Pointee + Sized>(pp: PayloadPointer<P>) -> P
pub unsafe fn deref<P: Pointee + Sized>(pp: PayloadPointer<P>) -> P
§Safety
equivalent to core::ptr::read on the pointee.
pub const fn from_raw_parts( ptr: NonNull<()>, meta: <T as Pointee>::Metadata, ) -> PayloadPointer<T>
pub const fn into_raw_parts(self) -> (NonNull<T>, <T as Pointee>::Metadata)where
T: Sized,
Source§impl<T> PayloadPointer<[T]>
impl<T> PayloadPointer<[T]>
pub const fn to_raw_slice(self) -> NonNull<[T]>where
T: Sized,
Source§impl PayloadPointer<str>
impl PayloadPointer<str>
pub const fn to_raw_str(self) -> *const str
Trait Implementations§
Source§impl<T: Clone + ?Sized + Pointee> Clone for PayloadPointer<T>
impl<T: Clone + ?Sized + Pointee> Clone for PayloadPointer<T>
Source§fn clone(&self) -> PayloadPointer<T>
fn clone(&self) -> PayloadPointer<T>
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<T: PartialOrd + ?Sized + Pointee> PartialOrd for PayloadPointer<T>
impl<T: PartialOrd + ?Sized + Pointee> PartialOrd for PayloadPointer<T>
impl<T: Copy + ?Sized + Pointee> Copy for PayloadPointer<T>
impl<T: Eq + ?Sized + Pointee> Eq for PayloadPointer<T>
impl<T: ?Sized + Pointee> StructuralPartialEq for PayloadPointer<T>
Auto Trait Implementations§
impl<T> Freeze for PayloadPointer<T>
impl<T> RefUnwindSafe for PayloadPointer<T>
impl<T> !Send for PayloadPointer<T>
impl<T> !Sync for PayloadPointer<T>
impl<T> Unpin for PayloadPointer<T>where
T: ?Sized,
impl<T> UnwindSafe for PayloadPointer<T>
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