[−][src]Struct drop_move::DropMoveWrapper
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]
pub fn clone(&self) -> DropMoveWrapper<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug + DropMove> Debug for DropMoveWrapper<T>
[src]
impl<T: Default + DropMove> Default for DropMoveWrapper<T>
[src]
pub fn default() -> DropMoveWrapper<T>
[src]
impl<T: DropMove> Deref for DropMoveWrapper<T>
[src]
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]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Ord + DropMove> Ord for DropMoveWrapper<T>
[src]
pub fn cmp(&self, other: &DropMoveWrapper<T>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<T: PartialEq + DropMove> PartialEq<DropMoveWrapper<T>> for DropMoveWrapper<T>
[src]
pub fn eq(&self, other: &DropMoveWrapper<T>) -> bool
[src]
pub fn ne(&self, other: &DropMoveWrapper<T>) -> bool
[src]
impl<T: PartialOrd + DropMove> PartialOrd<DropMoveWrapper<T>> for DropMoveWrapper<T>
[src]
pub fn partial_cmp(&self, other: &DropMoveWrapper<T>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &DropMoveWrapper<T>) -> bool
[src]
pub fn le(&self, other: &DropMoveWrapper<T>) -> bool
[src]
pub fn gt(&self, other: &DropMoveWrapper<T>) -> bool
[src]
pub fn ge(&self, other: &DropMoveWrapper<T>) -> bool
[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]
T: Send,
impl<T> Sync for DropMoveWrapper<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for DropMoveWrapper<T> where
T: Unpin,
[src]
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,