pub unsafe trait Unsigned{
Show 22 methods
// Required methods
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool);
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool);
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Unsigned, Self);
fn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Unsigned, Self);
fn cast_signed(self) -> Self::Signed;
fn checked_add_signed(self, rhs: Self::Signed) -> Option<Self>;
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>;
fn checked_next_power_of_two(self) -> Option<Self>;
fn checked_signed_diff(self, rhs: Self) -> Option<Self::Signed>;
fn checked_sub_signed(self, rhs: Self::Signed) -> Option<Self>;
fn div_ceil(self, rhs: Self) -> Self;
fn is_power_of_two(self) -> bool;
fn next_multiple_of(self, rhs: Self) -> Self;
fn next_power_of_two(self) -> Self;
fn overflowing_add_signed(self, rhs: Self::Signed) -> (Self, bool);
fn overflowing_sub_signed(self, rhs: Self::Signed) -> (Self, bool);
fn saturating_add_signed(self, rhs: Self::Signed) -> Self;
fn saturating_sub_signed(self, rhs: Self::Signed) -> Self;
fn strict_add_signed(self, rhs: Self::Signed) -> Self;
fn strict_sub_signed(self, rhs: Self::Signed) -> Self;
fn wrapping_add_signed(self, rhs: Self::Signed) -> Self;
fn wrapping_sub_signed(self, rhs: Self::Signed) -> Self;
}Expand description
Required Methods§
Sourcefn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
fn borrowing_sub(self, rhs: Self, borrow: bool) -> (Self, bool)
See u32::borrowing_sub.
Sourcefn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
fn carrying_add(self, rhs: Self, carry: bool) -> (Self, bool)
See u32::carrying_add.
Sourcefn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Unsigned, Self)
fn carrying_mul(self, rhs: Self, carry: Self) -> (Self::Unsigned, Self)
See u32::carrying_mul.
Sourcefn carrying_mul_add(
self,
mul: Self,
add: Self,
carry: Self,
) -> (Self::Unsigned, Self)
fn carrying_mul_add( self, mul: Self, add: Self, carry: Self, ) -> (Self::Unsigned, Self)
Sourcefn cast_signed(self) -> Self::Signed
fn cast_signed(self) -> Self::Signed
See u32::cast_signed.
Sourcefn checked_add_signed(self, rhs: Self::Signed) -> Option<Self>
fn checked_add_signed(self, rhs: Self::Signed) -> Option<Self>
Sourcefn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>
Sourcefn checked_next_power_of_two(self) -> Option<Self>
fn checked_next_power_of_two(self) -> Option<Self>
Sourcefn checked_signed_diff(self, rhs: Self) -> Option<Self::Signed>
fn checked_signed_diff(self, rhs: Self) -> Option<Self::Signed>
Sourcefn checked_sub_signed(self, rhs: Self::Signed) -> Option<Self>
fn checked_sub_signed(self, rhs: Self::Signed) -> Option<Self>
Sourcefn div_ceil(self, rhs: Self) -> Self
fn div_ceil(self, rhs: Self) -> Self
See u32::div_ceil.
Sourcefn is_power_of_two(self) -> bool
fn is_power_of_two(self) -> bool
See u32::is_power_of_two.
Sourcefn next_multiple_of(self, rhs: Self) -> Self
fn next_multiple_of(self, rhs: Self) -> Self
Sourcefn next_power_of_two(self) -> Self
fn next_power_of_two(self) -> Self
Sourcefn overflowing_add_signed(self, rhs: Self::Signed) -> (Self, bool)
fn overflowing_add_signed(self, rhs: Self::Signed) -> (Self, bool)
Sourcefn overflowing_sub_signed(self, rhs: Self::Signed) -> (Self, bool)
fn overflowing_sub_signed(self, rhs: Self::Signed) -> (Self, bool)
Sourcefn saturating_add_signed(self, rhs: Self::Signed) -> Self
fn saturating_add_signed(self, rhs: Self::Signed) -> Self
Sourcefn saturating_sub_signed(self, rhs: Self::Signed) -> Self
fn saturating_sub_signed(self, rhs: Self::Signed) -> Self
Sourcefn strict_add_signed(self, rhs: Self::Signed) -> Self
fn strict_add_signed(self, rhs: Self::Signed) -> Self
Sourcefn strict_sub_signed(self, rhs: Self::Signed) -> Self
fn strict_sub_signed(self, rhs: Self::Signed) -> Self
Sourcefn wrapping_add_signed(self, rhs: Self::Signed) -> Self
fn wrapping_add_signed(self, rhs: Self::Signed) -> Self
Sourcefn wrapping_sub_signed(self, rhs: Self::Signed) -> Self
fn wrapping_sub_signed(self, rhs: Self::Signed) -> 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.