Trait SetBit

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

Modify a single bit inside a value in place.

Required Methods§

Source

fn set_bit<const BIT: usize>(&mut self, value: bool)

Sets self’s specified bit to 1 if value is true, and 0 otherwise.

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 SetBit for i8

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for i16

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for i32

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for i64

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for i128

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for isize

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for u8

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for u16

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for u32

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for u64

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for u128

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for usize

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [i8]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [i16]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [i32]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [i64]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [i128]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [isize]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [u8]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [u16]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [u32]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [u64]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [u128]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl SetBit for [usize]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [i8; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [i16; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [i32; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [i64; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [i128; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [isize; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [u8; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [u16; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [u32; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [u64; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [u128; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Source§

impl<const N: usize> SetBit for [usize; N]

Source§

fn set_bit<const BIT: usize>(&mut self, value: bool)

Implementors§