pub struct AnyIncDecCpCmp<T>{ /* private fields */ }Expand description
The Generic Implementation of IncDecCpCmp.
Acts as the general proxy layer for working with any type inside crate.
Note: unlike NumberIncDecCpCmp, the self.inc(a,b) and self.dec(a,b) are unchecked! If you are working with primitive numbers use: NumberIncDecCpCmp in stead.
Implementations§
Trait Implementations§
Source§impl<T> Clone for AnyIncDecCpCmp<T>
impl<T> Clone for AnyIncDecCpCmp<T>
Source§fn clone(&self) -> AnyIncDecCpCmp<T>
fn clone(&self) -> AnyIncDecCpCmp<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T> Copy for AnyIncDecCpCmp<T>
Source§impl<T> CpCmp<T> for AnyIncDecCpCmp<T>where
T: PartialOrd + Copy,
impl<T> CpCmp<T> for AnyIncDecCpCmp<T>where
T: PartialOrd + Copy,
Source§impl<T> Debug for AnyIncDecCpCmp<T>
impl<T> Debug for AnyIncDecCpCmp<T>
Source§impl<T, V> IncDecCpCmp<T, V> for AnyIncDecCpCmp<T>
impl<T, V> IncDecCpCmp<T, V> for AnyIncDecCpCmp<T>
Source§fn inc(&self, a: &T, b: &V) -> Option<T>
fn inc(&self, a: &T, b: &V) -> Option<T>
Increments a by b, if the resulting value is le a None is returned.
Source§fn dec(&self, a: &T, b: &V) -> Option<T>
fn dec(&self, a: &T, b: &V) -> Option<T>
Increments a by b, if the resulting value is ge a None is returned.
fn cp_v(&self, v: &V) -> V
Auto Trait Implementations§
impl<T> Freeze for AnyIncDecCpCmp<T>where
T: Freeze,
impl<T> RefUnwindSafe for AnyIncDecCpCmp<T>where
T: RefUnwindSafe,
impl<T> Send for AnyIncDecCpCmp<T>where
T: Send,
impl<T> Sync for AnyIncDecCpCmp<T>where
T: Sync,
impl<T> Unpin for AnyIncDecCpCmp<T>where
T: Unpin,
impl<T> UnsafeUnpin for AnyIncDecCpCmp<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AnyIncDecCpCmp<T>where
T: UnwindSafe,
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