Expand description
ThinBox implementation.
Based on
https://github.com/matthieu-m/rfc2580/blob/b58d1d3cba0d4b5e859d3617ea2d0943aaa31329/examples/thin.rs
by matthieu-m
Re-exportsยง
use core::error::Error;๐use core::fmt;๐use core::fmt::Debug;๐use core::fmt::Debug;๐use core::fmt::Display;๐use core::fmt::Formatter;๐use core::intrinsics::const_allocate;๐Experimental use core::intrinsics::const_make_global;๐Experimental use core::marker::PhantomData;๐use core::marker::Unsize;๐Experimental use core::mem;๐use core::mem::SizedTypeProperties;๐Experimental use core::ops::Deref;๐use core::ops::DerefMut;๐use core::ptr;๐use core::ptr::NonNull;๐use core::ptr::Pointee;๐Experimental use crate::alloc;๐use crate::alloc::Layout;๐use crate::alloc::LayoutError;๐
Structsยง
- With
Header ๐ - A pointer to type-erased data, guaranteed to either be:
- With
Opaque ๐Header - An opaque representation of
WithHeader<H>to avoid the projection invariance of<T as Pointee>::Metadata. - ThinBox
Experimental - ThinBox.