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", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Bits for i16

Source§

const BITS: usize = 16usize

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 = 32usize

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 = 64usize

Source§

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

Source§

fn set_bit(&mut self, i: usize)

Implementors§