pub trait SignedInteger:
Numeric
+ Neg<Output = Self>
+ Add<Self, Output = Self>
+ AddAssign<Self>
+ Div<Self, Output = Self>
+ DivAssign<Self>
+ Mul<Self, Output = Self>
+ MulAssign<Self>
+ Rem<Self, Output = Self>
+ RemAssign<Self>
+ Sub<Self, Output = Self>
+ SubAssign<Self>
+ BitAnd<Self, Output = Self>
+ BitAndAssign<Self>
+ BitOr<Self, Output = Self>
+ BitOrAssign<Self>
+ BitXor<Self, Output = Self>
+ BitXorAssign<Self>
+ Not<Output = Self>
+ Shl<usize, Output = Self>
+ ShlAssign<usize>
+ Shr<usize, Output = Self>
+ ShrAssign<usize>
+ CastFrom<f64>
+ CastInto<f64> {
type Unsigned: UnsignedInteger<Signed = Self> + CastFrom<Self>;
// Required methods
fn into_unsigned(self) -> Self::Unsigned;
fn to_bits_string(&self, block_length: usize) -> String;
}Expand description
A trait shared by all the unsigned integer types.
Required Associated Types§
Sourcetype Unsigned: UnsignedInteger<Signed = Self> + CastFrom<Self>
type Unsigned: UnsignedInteger<Signed = Self> + CastFrom<Self>
The unsigned type of the same precicion
Required Methods§
Sourcefn into_unsigned(self) -> Self::Unsigned
fn into_unsigned(self) -> Self::Unsigned
Returns the casting of the current value to the unsigned type of the same size.
Sourcefn to_bits_string(&self, block_length: usize) -> String
fn to_bits_string(&self, block_length: usize) -> String
Returns a bit representation of the integer, where blocks of length block_length are
separated by whitespaces to increase the readability.
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.