Skip to main content

Bits

Trait Bits 

Source
pub trait Bits: Default {
    const BITS: usize;

    // Required methods
    fn get_bit(&self, i: usize) -> bool;
    fn set_bit(&mut self, i: usize);
}

Required Associated Constants§

Required Methods§

Source

fn get_bit(&self, i: usize) -> bool

Source

fn set_bit(&mut self, i: usize)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Bits for i16

Source§

const BITS: usize = 16

Source§

fn get_bit(&self, i: usize) -> bool

Source§

fn set_bit(&mut self, i: usize)

Source§

impl Bits for i32

Source§

const BITS: usize = 32

Source§

fn get_bit(&self, i: usize) -> bool

Source§

fn set_bit(&mut self, i: usize)

Source§

impl Bits for i64

Source§

const BITS: usize = 64

Source§

fn get_bit(&self, i: usize) -> bool

Source§

fn set_bit(&mut self, i: usize)

Implementors§