pub struct Unsigned<const W: u32>(/* private fields */);
Expand description
Implementations§
Trait Implementations§
Source§impl<const W: u32> Div for Unsigned<W>
impl<const W: u32> Div for Unsigned<W>
Source§impl<const W: u32> Ord for Unsigned<W>
impl<const W: u32> Ord for Unsigned<W>
Source§impl<const W: u32> PartialOrd for Unsigned<W>
impl<const W: u32> PartialOrd for Unsigned<W>
Source§impl<const W: u32> Rem for Unsigned<W>
impl<const W: u32> Rem for Unsigned<W>
Source§impl<const W: u32> Shl for Unsigned<W>
impl<const W: u32> Shl for Unsigned<W>
Source§fn shl(self, rhs: Unsigned<W>) -> Self::Output
fn shl(self, rhs: Unsigned<W>) -> 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 W: u32> Shr for Unsigned<W>
impl<const W: u32> Shr for Unsigned<W>
Source§fn shr(self, rhs: Unsigned<W>) -> Self::Output
fn shr(self, rhs: Unsigned<W>) -> 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 W: u32> Copy for Unsigned<W>
impl<const W: u32> Eq for Unsigned<W>
impl<const W: u32> StructuralPartialEq for Unsigned<W>
Auto Trait Implementations§
impl<const W: u32> Freeze for Unsigned<W>
impl<const W: u32> RefUnwindSafe for Unsigned<W>
impl<const W: u32> Send for Unsigned<W>
impl<const W: u32> Sync for Unsigned<W>
impl<const W: u32> Unpin for Unsigned<W>
impl<const W: u32> UnwindSafe for Unsigned<W>
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more