pub trait Number:
NumberLike
+ LowerExp
+ UpperExp
+ Add<Self>
+ for<'a> Add<&'a Self>
+ AddAssign<Self>
+ for<'a> AddAssign<&'a Self>
+ Sub<Self>
+ for<'a> Sub<&'a Self>
+ SubAssign<Self>
+ for<'a> SubAssign<&'a Self>
+ Mul<Self>
+ for<'a> Mul<&'a Self>
+ MulAssign<Self>
+ for<'a> MulAssign<&'a Self>
+ Div<Self>
+ for<'a> Div<&'a Self>
+ DivAssign<Self>
+ for<'a> DivAssign<&'a Self>
+ Rem<Self>
+ for<'a> Rem<&'a Self>
+ RemAssign<Self>
+ for<'a> RemAssign<&'a Self>
+ TryFrom<u8>
+ TryFrom<u16>
+ TryFrom<i8>
+ TryFrom<i16>
+ Sum
+ Product {
const ZERO: Self;
const ONE: Self;
const TWO: Self;
// Required methods
fn from_bytes(bytes: Self::ByteArray) -> Self;
fn as_mut_bytes(&mut self) -> &mut Self::ByteArray;
fn from_be_bytes(bytes: Self::ByteArray) -> Self;
fn from_le_bytes(bytes: Self::ByteArray) -> Self;
fn from_ne_bytes(bytes: Self::ByteArray) -> Self;
fn abs(self) -> Self;
fn signum(self) -> Self;
fn div_euclid(self, rhs: Self) -> Self;
fn rem_euclid(self, rhs: Self) -> Self;
}
Required Associated Constants§
Required Methods§
fn from_bytes(bytes: Self::ByteArray) -> Self
fn as_mut_bytes(&mut self) -> &mut Self::ByteArray
fn from_be_bytes(bytes: Self::ByteArray) -> Self
fn from_le_bytes(bytes: Self::ByteArray) -> Self
fn from_ne_bytes(bytes: Self::ByteArray) -> Self
Sourcefn signum(self) -> Self
fn signum(self) -> Self
See i32::signum
.
fn div_euclid(self, rhs: Self) -> Self
fn rem_euclid(self, rhs: Self) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.