[][src]Struct drop_move::DropMoveWrapper

pub struct DropMoveWrapper<T: DropMove>(_);

A wrapper around the inner structure T that calls drop_move when it is dropped.

The inner structure members can be borrowed using the Deref and DerefMut implementations, or be moved with into_inner.

Implementations

impl<T: DropMove> DropMoveWrapper<T>[src]

pub fn new(x: T) -> Self[src]

Wrap the inner structure, so that it will be dropped with drop_move.

pub fn into_inner(self_: Self) -> T[src]

Convert into the inner structure T.

This is an associated function so that will not conflict with any methods of the inner type, which are accessible through Deref.

Trait Implementations

impl<T: Clone + DropMove> Clone for DropMoveWrapper<T>[src]

impl<T: Debug + DropMove> Debug for DropMoveWrapper<T>[src]

impl<T: Default + DropMove> Default for DropMoveWrapper<T>[src]

impl<T: DropMove> Deref for DropMoveWrapper<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: DropMove> DerefMut for DropMoveWrapper<T>[src]

impl<T: DropMove> Drop for DropMoveWrapper<T>[src]

impl<T: Eq + DropMove> Eq for DropMoveWrapper<T>[src]

impl<T: Hash + DropMove> Hash for DropMoveWrapper<T>[src]

impl<T: Ord + DropMove> Ord for DropMoveWrapper<T>[src]

impl<T: PartialEq + DropMove> PartialEq<DropMoveWrapper<T>> for DropMoveWrapper<T>[src]

impl<T: PartialOrd + DropMove> PartialOrd<DropMoveWrapper<T>> for DropMoveWrapper<T>[src]

impl<T: DropMove> StructuralEq for DropMoveWrapper<T>[src]

impl<T: DropMove> StructuralPartialEq for DropMoveWrapper<T>[src]

Auto Trait Implementations

impl<T> Send for DropMoveWrapper<T> where
    T: Send
[src]

impl<T> Sync for DropMoveWrapper<T> where
    T: Sync
[src]

impl<T> Unpin for DropMoveWrapper<T> where
    T: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.