Skip to main content

SetBit

Trait SetBit 

Source
pub trait SetBit<O>
where O: BitOrder,
{ // Required method fn set_bit(&mut self, index: usize, value: bool); }
Expand description

Trait for setting a bit at a given index.

Required Methods§

Source

fn set_bit(&mut self, index: usize, value: bool)

Sets the bit at the given index to value.

§Panics

Implementations may panic if the provided index is out of bounds.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SetBit<Lsb0> for i8

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for i16

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for i32

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for i64

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for i128

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for isize

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for u8

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for u16

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for u32

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for u64

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for u128

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Lsb0> for usize

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for i8

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for i16

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for i32

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for i64

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for i128

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for isize

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for u8

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for u16

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for u32

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for u64

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for u128

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl SetBit<Msb0> for usize

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl<O> SetBit<O> for bool
where O: BitOrder,

Source§

fn set_bit(&mut self, index: usize, value: bool)

Source§

impl<T, O> SetBit<O> for &mut T
where T: SetBit<O> + ?Sized, O: BitOrder,

Source§

fn set_bit(&mut self, index: usize, value: bool)

Implementors§