Trait concrete_commons::numeric::SignedInteger
source · [−]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>;
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.
Associated Types
type Unsigned: UnsignedInteger<Signed = Self> + CastFrom<Self>
type Unsigned: UnsignedInteger<Signed = Self> + CastFrom<Self>
The unsigned type of the same precicion
Required methods
fn 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.
fn 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.