Trait ptr_meta::PtrExt

source ·
pub trait PtrExt<T: Pointee + ?Sized> {
    type Raw;

    // Required method
    fn to_raw_parts(self) -> (Self::Raw, <T as Pointee>::Metadata);
}
Expand description

Extension methods for pointers.

Required Associated Types§

source

type Raw

The type’s raw pointer (*const () or *mut ()).

Required Methods§

source

fn to_raw_parts(self) -> (Self::Raw, <T as Pointee>::Metadata)

Decompose a (possibly wide) pointer into its address and metadata components.

The pointer can be later reconstructed with from_raw_parts.

Implementations on Foreign Types§

source§

impl<T: Pointee + ?Sized> PtrExt<T> for *const T

§

type Raw = *const ()

source§

fn to_raw_parts(self) -> (Self::Raw, <T as Pointee>::Metadata)

source§

impl<T: Pointee + ?Sized> PtrExt<T> for *mut T

§

type Raw = *mut ()

source§

fn to_raw_parts(self) -> (Self::Raw, <T as Pointee>::Metadata)

Implementors§