Struct multiboot2::builder::BoxedDst
source · pub struct BoxedDst<T: ?Sized> { /* private fields */ }
Expand description
A helper type to create boxed DST, i.e., tags with a dynamic size for the
builder. This is tricky in Rust. This type behaves similar to the regular
Box
type except that it ensure the same layout is used for the (explicit)
allocation and the (implicit) deallocation of memory. Otherwise, I didn’t
find any way to figure out the right layout for a DST. Miri always reported
issues that the deallocation used a wrong layout.
Technically, I’m certain this code is memory safe. But with this type, I also can convince miri that it is.
Trait Implementations§
impl<T: Eq + ?Sized> Eq for BoxedDst<T>
Auto Trait Implementations§
impl<T> Freeze for BoxedDst<T>where
T: ?Sized,
impl<T> RefUnwindSafe for BoxedDst<T>where
T: RefUnwindSafe + ?Sized,
impl<T> !Send for BoxedDst<T>
impl<T> !Sync for BoxedDst<T>
impl<T> Unpin for BoxedDst<T>where
T: Unpin + ?Sized,
impl<T> UnwindSafe for BoxedDst<T>where
T: RefUnwindSafe + UnwindSafe + ?Sized,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more