Struct extprim::traits::Wrapping [] [src]

pub struct Wrapping<T>(pub T);

Wrapper for u128 and i128 to turn arithmetic operators to wrapping ones.

Equivalent to std::num::Wrapping, but due to E0117 (orphan rule) we need to define it here to implement operators on it.

Trait Implementations

impl Add<Wrapping<u128>> for Wrapping<u128>

type Output = Self

fn add(self, other: Wrapping<u128>) -> Self

impl Sub<Wrapping<u128>> for Wrapping<u128>

type Output = Self

fn sub(self, other: Wrapping<u128>) -> Self

impl Neg for Wrapping<u128>

type Output = Self

fn neg(self) -> Self

impl Not for Wrapping<u128>

type Output = Self

fn not(self) -> Self

impl BitAnd for Wrapping<u128>

type Output = Self

fn bitand(self, other: Self) -> Self

impl BitOr for Wrapping<u128>

type Output = Self

fn bitor(self, other: Self) -> Self

impl BitXor for Wrapping<u128>

type Output = Self

fn bitxor(self, other: Self) -> Self

impl Shl<u32> for Wrapping<u128>

type Output = Self

fn shl(self, other: u32) -> Self

impl Shr<u32> for Wrapping<u128>

type Output = Self

fn shr(self, other: u32) -> Self

impl Mul<Wrapping<u128>> for Wrapping<u128>

type Output = Self

fn mul(self, other: Wrapping<u128>) -> Self

impl Mul<Wrapping<u64>> for Wrapping<u128>

type Output = Self

fn mul(self, other: Wrapping<u64>) -> Self

impl Mul<Wrapping<u128>> for Wrapping<u64>

type Output = Wrapping<u128>

fn mul(self, other: Wrapping<u128>) -> Wrapping<u128>

impl Div for Wrapping<u128>

type Output = Self

fn div(self, other: Self) -> Self

impl Rem for Wrapping<u128>

type Output = Self

fn rem(self, other: Self) -> Self

impl Add<Wrapping<i128>> for Wrapping<i128>

type Output = Self

fn add(self, other: Wrapping<i128>) -> Self

impl Sub<Wrapping<i128>> for Wrapping<i128>

type Output = Self

fn sub(self, other: Wrapping<i128>) -> Self

impl Neg for Wrapping<i128>

type Output = Self

fn neg(self) -> Self

impl Not for Wrapping<i128>

type Output = Self

fn not(self) -> Self

impl BitAnd for Wrapping<i128>

type Output = Self

fn bitand(self, other: Self) -> Self

impl BitOr for Wrapping<i128>

type Output = Self

fn bitor(self, other: Self) -> Self

impl BitXor for Wrapping<i128>

type Output = Self

fn bitxor(self, other: Self) -> Self

impl Shl<u32> for Wrapping<i128>

type Output = Self

fn shl(self, other: u32) -> Self

impl Shr<u32> for Wrapping<i128>

type Output = Self

fn shr(self, other: u32) -> Self

impl Mul<Wrapping<i128>> for Wrapping<i128>

type Output = Self

fn mul(self, other: Wrapping<i128>) -> Self

impl Div for Wrapping<i128>

type Output = Self

fn div(self, other: Self) -> Self

impl Rem for Wrapping<i128>

type Output = Self

fn rem(self, other: Self) -> Self

Derived Implementations

impl<T: Default> Default for Wrapping<T>

fn default() -> Wrapping<T>

impl<T: Debug> Debug for Wrapping<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<T: Copy> Copy for Wrapping<T>

impl<T: Clone> Clone for Wrapping<T>

fn clone(&self) -> Wrapping<T>

1.0.0fn clone_from(&mut self, source: &Self)

impl<T: Ord> Ord for Wrapping<T>

fn cmp(&self, __arg_0: &Wrapping<T>) -> Ordering

impl<T: PartialOrd> PartialOrd for Wrapping<T>

fn partial_cmp(&self, __arg_0: &Wrapping<T>) -> Option<Ordering>

fn lt(&self, __arg_0: &Wrapping<T>) -> bool

fn le(&self, __arg_0: &Wrapping<T>) -> bool

fn gt(&self, __arg_0: &Wrapping<T>) -> bool

fn ge(&self, __arg_0: &Wrapping<T>) -> bool

impl<T: Eq> Eq for Wrapping<T>

impl<T: PartialEq> PartialEq for Wrapping<T>

fn eq(&self, __arg_0: &Wrapping<T>) -> bool

fn ne(&self, __arg_0: &Wrapping<T>) -> bool