pub struct IvarDrop<T> { /* private fields */ }
Expand description
A helper type to allow putting certain types that may drop into ivars.
This is used to work around current limitations in the type system.
Consider this type “temporary” in the sense that one day it may just
become type IvarDrop<T> = T
.
This currently works with the following types:
Box<T>
Option<Box<T>>
Id<T, O>
Option<Id<T, O>>
Further may be added when the standard library guarantees their layout.
See examples/delegate.rs
for usage.
Trait Implementations
sourceimpl<T: Sized> InnerIvarType for IvarDrop<Box<T>>
impl<T: Sized> InnerIvarType for IvarDrop<Box<T>>
Auto Trait Implementations
impl<T> RefUnwindSafe for IvarDrop<T> where
T: RefUnwindSafe,
impl<T> Send for IvarDrop<T> where
T: Send,
impl<T> Sync for IvarDrop<T> where
T: Sync,
impl<T> Unpin for IvarDrop<T> where
T: Unpin,
impl<T> UnwindSafe for IvarDrop<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more