Trait BitOps

Source
pub trait BitOps {
    // Required methods
    fn set_bit(&mut self, pos: u8) -> Self;
    fn clear_bit(&mut self, pos: u8) -> Self;
    fn check_bit(&self, pos: u8) -> BitState;
}
Expand description

Simple bit ops

Required Methods§

Source

fn set_bit(&mut self, pos: u8) -> Self

Source

fn clear_bit(&mut self, pos: u8) -> Self

Source

fn check_bit(&self, pos: u8) -> BitState

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BitOps for u8

Source§

fn set_bit(&mut self, pos: u8) -> Self

Source§

fn clear_bit(&mut self, pos: u8) -> Self

Source§

fn check_bit(&self, pos: u8) -> BitState

Implementors§