pub trait BitsOps<T> {
fn set(&self) -> T;
fn clr(&self) -> T;
fn revert(&self) -> T;
fn write(&self, value: T) -> T;
fn read(&self) -> T;
fn is_clr(&self) -> bool;
fn is_set(&self) -> bool;
fn count_ones(&self) -> u32;
fn msb(&self) -> bool;
fn lsb(&self) -> bool;
}
Expand description
bits 的实际操作