pub struct VBox { /* private fields */ }
Expand description
A type erased Box of trait object that stores the vtable pointer.
This is just like a Box<dyn Trait>
but erases type Trait
so that the
channel for sending it does not need to have Trait
as one of its type
parameters. Only the sending end and the receiving end need to agree on the
type parameters.
Internally, it stores the trait object’s data pointer in a Box<dyn Any>
,
so that the Drop::drop()
will be called when the wrapper is dropped.
And it stores the vtable pointer in another usize
to make sure it is
Send
.
Implementations§
Auto Trait Implementations§
impl Freeze for VBox
impl !RefUnwindSafe for VBox
impl Send for VBox
impl !Sync for VBox
impl Unpin for VBox
impl !UnwindSafe for VBox
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