[][src]Struct drop_move::DropGuard

pub struct DropGuard<F: FnOnce()>(_);

Run a FnOnce function on drop.

Implementations

impl<F: FnOnce()> DropGuard<F>[src]

pub fn new(f: F) -> Self[src]

Construct from a FnOnce function.

pub fn into_inner(self) -> F[src]

Extract the function.

Trait Implementations

impl<F: Clone + FnOnce()> Clone for DropGuard<F>[src]

impl<F: FnOnce()> Deref for DropGuard<F>[src]

type Target = F

The resulting type after dereferencing.

impl<F: FnOnce()> DerefMut for DropGuard<F>[src]

impl<F: FnOnce()> From<F> for DropGuard<F>[src]

Auto Trait Implementations

impl<F> Send for DropGuard<F> where
    F: Send
[src]

impl<F> Sync for DropGuard<F> where
    F: Sync
[src]

impl<F> Unpin for DropGuard<F> where
    F: 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<!> for T[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.