pub struct Unsigned<const L: u32>(/* private fields */);
Expand description
Implementations§
Trait Implementations§
Source§impl<const L: u32> Div for Unsigned<L>
impl<const L: u32> Div for Unsigned<L>
Source§impl<const L: u32> Ord for Unsigned<L>
impl<const L: u32> Ord for Unsigned<L>
Source§impl<const L: u32> PartialOrd for Unsigned<L>
impl<const L: u32> PartialOrd for Unsigned<L>
Source§impl<const L: u32> Rem for Unsigned<L>
impl<const L: u32> Rem for Unsigned<L>
Source§impl<const L: u32> Shl for Unsigned<L>
impl<const L: u32> Shl for Unsigned<L>
Source§fn shl(self, rhs: Unsigned<L>) -> Self::Output
fn shl(self, rhs: Unsigned<L>) -> Self::Output
Performs a left shift.
Unlike a right shift, where the behaviour is dependent on signedness, the left shift has the same behaviour: shifted-out bits on the left are discarded and zeros are shifted in on the right.
The right-hand side operand is interpreted as unsigned and if it
is equal or greater to the bit-width, the result is all-zeros,
as in Rust unbounded_shl
. It is planned to restrict the bit-width
in the future so that this edge case can never occur.
Source§impl<const L: u32> Shr for Unsigned<L>
impl<const L: u32> Shr for Unsigned<L>
Source§fn shr(self, rhs: Unsigned<L>) -> Self::Output
fn shr(self, rhs: Unsigned<L>) -> Self::Output
Performs a logic right shift.
The right-hand side operand is interpreted as unsigned and if it
is equal or greater to the bit-width, the result is all-zeros,
as in Rust unbounded_shr
on unsigned primitives.
It is planned to restrict the bit-width in the future so that this edge
case can never occur.
impl<const L: u32> Copy for Unsigned<L>
impl<const L: u32> Eq for Unsigned<L>
impl<const L: u32> StructuralPartialEq for Unsigned<L>
Auto Trait Implementations§
impl<const L: u32> Freeze for Unsigned<L>
impl<const L: u32> RefUnwindSafe for Unsigned<L>
impl<const L: u32> Send for Unsigned<L>
impl<const L: u32> Sync for Unsigned<L>
impl<const L: u32> Unpin for Unsigned<L>
impl<const L: u32> UnwindSafe for Unsigned<L>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.