pub trait BitOps:
Copy
+ Clone
+ PartialEq
+ Eq
+ Hash
+ Debug
+ Sized
+ 'static {
const ZERO: Self;
const ONE: Self;
const MAX: Self;
const BITS: u32;
// Required methods
fn shl(self, n: u32) -> Self;
fn shr(self, n: u32) -> Self;
fn bitand(self, other: Self) -> Self;
fn bitor(self, other: Self) -> Self;
fn bitxor(self, other: Self) -> Self;
fn not(self) -> Self;
fn wrapping_sub(self, other: Self) -> Self;
fn wrapping_add(self, other: Self) -> Self;
fn to_u128(self) -> u128;
fn from_u128(v: u128) -> Self;
fn is_zero(self) -> bool;
fn leading_zeros(self) -> u32;
}Required Associated Constants§
Required Methods§
fn shl(self, n: u32) -> Self
fn shr(self, n: u32) -> Self
fn bitand(self, other: Self) -> Self
fn bitor(self, other: Self) -> Self
fn bitxor(self, other: Self) -> Self
fn not(self) -> Self
fn wrapping_sub(self, other: Self) -> Self
fn wrapping_add(self, other: Self) -> Self
fn to_u128(self) -> u128
fn from_u128(v: u128) -> Self
fn is_zero(self) -> bool
fn leading_zeros(self) -> u32
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".