pub trait Signed {
type Signed;
type Unsigned;
// Required methods
fn as_unsigned(self) -> Self::Unsigned;
fn as_signed(self) -> Self::Signed;
fn abs_unsigned(self) -> Self::Unsigned;
}Expand description
Types with signed and unsigned variants
Note that references don’t currently implement this trait due to
lack of GATs, which are required to specify that a &'a u8 may
be cast to a &'a i8 with the same lifetime.
Required Associated Types§
Required Methods§
Sourcefn as_unsigned(self) -> Self::Unsigned
fn as_unsigned(self) -> Self::Unsigned
Reinterprets this value as unsigned
Sourcefn abs_unsigned(self) -> Self::Unsigned
fn abs_unsigned(self) -> Self::Unsigned
Returns the absolute value of self as unsigned.