Struct alloc::boxed::thin::WithHeader
source · #[repr(transparent)]struct WithHeader<H>(NonNull<u8>, PhantomData<H>);
Expand description
A pointer to type-erased data, guaranteed to either be:
NonNull::dangling()
, in the case where both the pointee (T
) and metadata (H
) are ZSTs.- A pointer to a valid
T
that has a headerH
directly before the pointed-to location.
Tuple Fields§
§0: NonNull<u8>
§1: PhantomData<H>
Implementations§
source§impl<H> WithHeader<H>
impl<H> WithHeader<H>
Auto Trait Implementations§
impl<H> RefUnwindSafe for WithHeader<H>where H: RefUnwindSafe,
impl<H> !Send for WithHeader<H>
impl<H> !Sync for WithHeader<H>
impl<H> Unpin for WithHeader<H>where H: Unpin,
impl<H> UnwindSafe for WithHeader<H>where H: 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