[−][src]Trait num_traits::sign::Signed
Useful functions for signed numbers (i.e. numbers that can be negative).
Required methods
fn abs(&self) -> Self
[+]
fn abs_sub(&self, other: &Self) -> Self
[+]
fn signum(&self) -> Self
[+]
fn is_positive(&self) -> bool
[+]
fn is_negative(&self) -> bool
[+]
Implementations on Foreign Types
impl Signed for isize
[src][−]
fn abs(&self) -> isize
[src]
fn abs_sub(&self, other: &isize) -> isize
[src]
fn signum(&self) -> isize
[src]
fn is_positive(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
impl Signed for i8
[src][−]
fn abs(&self) -> i8
[src]
fn abs_sub(&self, other: &i8) -> i8
[src]
fn signum(&self) -> i8
[src]
fn is_positive(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
impl Signed for i16
[src][−]
fn abs(&self) -> i16
[src]
fn abs_sub(&self, other: &i16) -> i16
[src]
fn signum(&self) -> i16
[src]
fn is_positive(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
impl Signed for i32
[src][−]
fn abs(&self) -> i32
[src]
fn abs_sub(&self, other: &i32) -> i32
[src]
fn signum(&self) -> i32
[src]
fn is_positive(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
impl Signed for i64
[src][−]
fn abs(&self) -> i64
[src]
fn abs_sub(&self, other: &i64) -> i64
[src]
fn signum(&self) -> i64
[src]
fn is_positive(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
impl Signed for i128
[src][−]
fn abs(&self) -> i128
[src]
fn abs_sub(&self, other: &i128) -> i128
[src]
fn signum(&self) -> i128
[src]
fn is_positive(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]
impl<T: Signed> Signed for Wrapping<T> where
Wrapping<T>: Num + Neg<Output = Wrapping<T>>,
[src][−]
Wrapping<T>: Num + Neg<Output = Wrapping<T>>,