Struct nodrop_union::NoDrop
[−]
[src]
pub struct NoDrop<T>(_);
A type holding T that will not call its destructor on drop
The untagged unions implementation of NoDrop<T>
is Copy where T: Copy,
which was not possible in the stable implementation.
Methods
impl<T> NoDrop<T>
[src]
fn new(value: T) -> Self
Create a new NoDrop.
fn into_inner(self) -> T
Extract the inner value.
Once extracted, the value can of course drop again.
Trait Implementations
impl<T: Copy> Copy for NoDrop<T>
[src]
impl<T: Clone> Clone for NoDrop<T>
[src]
fn clone(&self) -> NoDrop<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T> Deref for NoDrop<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T> DerefMut for NoDrop<T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value