pub struct Move<T: ?Sized> { /* private fields */ }Expand description
A type that allows an unsized value to be moved
Implementations§
Source§impl<T: ?Sized> Move<T>
impl<T: ?Sized> Move<T>
Sourcepub fn get_ref(&self) -> Option<&T>
pub fn get_ref(&self) -> Option<&T>
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§
Auto Trait Implementations§
impl<T> !Freeze for Move<T>
impl<T> !RefUnwindSafe for Move<T>
impl<T> Send for Move<T>
impl<T> !Sync for Move<T>
impl<T> Unpin for Move<T>
impl<T> UnwindSafe for Move<T>where
T: UnwindSafe + ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more