pub struct WithDrop<T, F: FnOnce(T)> { /* private fields */ }
Expand description
Container that holds a value and a customestructor
Implementations
Trait Implementations
sourceimpl<T: Ord, F: Ord + FnOnce(T)> Ord for WithDrop<T, F>
impl<T: Ord, F: Ord + FnOnce(T)> Ord for WithDrop<T, F>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq<T>, F1: FnOnce(T), F2: FnOnce(T)> PartialEq<WithDrop<T, F2>> for WithDrop<T, F1>
impl<T: PartialEq<T>, F1: FnOnce(T), F2: FnOnce(T)> PartialEq<WithDrop<T, F2>> for WithDrop<T, F1>
sourceimpl<T: PartialOrd<T>, F1: FnOnce(T), F2: FnOnce(T)> PartialOrd<WithDrop<T, F2>> for WithDrop<T, F1>
impl<T: PartialOrd<T>, F1: FnOnce(T), F2: FnOnce(T)> PartialOrd<WithDrop<T, F2>> for WithDrop<T, F1>
sourcefn partial_cmp(&self, other: &WithDrop<T, F2>) -> Option<Ordering>
fn partial_cmp(&self, other: &WithDrop<T, F2>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Eq, F: Eq + FnOnce(T)> Eq for WithDrop<T, F>
impl<T, F: FnOnce(T)> StructuralEq for WithDrop<T, F>
Auto Trait Implementations
impl<T, F> RefUnwindSafe for WithDrop<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for WithDrop<T, F>where
F: Send,
T: Send,
impl<T, F> Sync for WithDrop<T, F>where
F: Sync,
T: Sync,
impl<T, F> Unpin for WithDrop<T, F>where
F: Unpin,
T: Unpin,
impl<T, F> UnwindSafe for WithDrop<T, F>where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more