[][src]Struct unsized_enum::Move

pub struct Move<T: ?Sized> { /* fields omitted */ }

A type that allows an unsized value to be moved

Implementations

impl<T> Move<T>[src]

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

impl<T: ?Sized> Move<T>[src]

pub fn get_ref(&self) -> Option<&T>[src]

Get a reference to the contained value and mark it as moved if it has not yet been moved, otherwise return None. If the caller does not move the value out (through copying in unsafe code), then the value will leak (like mem::forget). However leaking memory is safe, so this interface doesn't need to be marked unsafe.

Trait Implementations

impl<T: ?Sized> Drop for Move<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Move<T>

impl<T: ?Sized> Send for Move<T> where
    T: Send

impl<T> !Sync for Move<T>

impl<T: ?Sized> Unpin for Move<T> where
    T: Unpin

impl<T: ?Sized> UnwindSafe for Move<T> where
    T: UnwindSafe

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.