pub enum Reach {
Multiples(i128),
Bits(i128),
Below(i128),
}Expand description
What an integer expression can be whatever its inputs are, read from how it is written. Each holds also when the arithmetic wraps.
Variants§
Multiples(i128)
A multiple of this power of two (x * 8, x << 3).
Bits(i128)
Not negative, with no bit outside of this mask (x & 0xF0).
Below(i128)
Smaller in size than this (x % 10).
Implementations§
Source§impl Reach
impl Reach
pub fn holds(self, value: i128) -> bool
Sourcepub fn of_shift(bits: u32, (low, high): (i128, i128)) -> Option<Reach>
pub fn of_shift(bits: u32, (low, high): (i128, i128)) -> Option<Reach>
What x << bits can be for a type whose values go from low to high. Where
overflow is not checked, a shift by the width of the type or more is a shift by
the remainder: only that many low bits are sure to be zero. None when that is
none, or the width cannot be told.
Trait Implementations§
impl Copy for Reach
impl Eq for Reach
impl StructuralPartialEq for Reach
Auto Trait Implementations§
impl Forget for Reach
impl Freeze for Reach
impl Move for Reach
impl RefUnwindSafe for Reach
impl Send for Reach
impl Sync for Reach
impl Unpin for Reach
impl UnsafeUnpin for Reach
impl UnwindSafe for Reach
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.