Struct left_right::Taken [−][src]
pub struct Taken<T: Absorb<O>, O> { /* fields omitted */ }
A smart pointer to an owned backing data structure. This makes sure that the
data is dropped correctly (using Absorb::drop_second
).
Additionally it allows for unsafely getting the inner data out using into_box()
.
Implementations
impl<T: Absorb<O>, O> Taken<T, O>
[src]
impl<T: Absorb<O>, O> Taken<T, O>
[src]pub unsafe fn into_box(self) -> Box<T>
[src]
pub unsafe fn into_box(self) -> Box<T>
[src]This is unsafe because you must call Absorb::drop_second
in
case just dropping T
is not safe and sufficient.
If you used the default implementation of Absorb::drop_second
(which just calls drop
)
you don’t need to call Absorb::drop_second
.
Trait Implementations
Auto Trait Implementations
impl<T, O> RefUnwindSafe for Taken<T, O> where
O: RefUnwindSafe,
T: RefUnwindSafe,
O: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, O> Send for Taken<T, O> where
O: Send,
T: Send,
O: Send,
T: Send,
impl<T, O> Sync for Taken<T, O> where
O: Sync,
T: Sync,
O: Sync,
T: Sync,
impl<T, O> Unpin for Taken<T, O> where
O: Unpin,
O: Unpin,
impl<T, O> UnwindSafe for Taken<T, O> where
O: UnwindSafe,
T: UnwindSafe,
O: UnwindSafe,
T: UnwindSafe,