BitStoreMut

Trait BitStoreMut 

Source
pub trait BitStoreMut: BitStore {
    // Required methods
    unsafe fn set(&mut self, index: u32);
    unsafe fn unset(&mut self, index: u32);
    fn union_with(&mut self, other: &Self);
    fn intersect_with(&mut self, other: &Self);
    fn difference_with(&mut self, other: &Self);
    fn symmetric_difference_with(&mut self, other: &Self);
    fn negate(&mut self);
}
Expand description

A trait for types that can be used to store bits and can be modified.

Required Methods§

Source

unsafe fn set(&mut self, index: u32)

Sets the bit at the given index to 1.

§Safety

The index must be in range 0..BitStore::BITS.

Source

unsafe fn unset(&mut self, index: u32)

Sets the bit at the given index to 0.

§Safety

The index must be in range 0..BitStore::BITS.

Source

fn union_with(&mut self, other: &Self)

Unions this bitset with another, modifying self in place.

Source

fn intersect_with(&mut self, other: &Self)

Intersects this bitset with another, modifying self in place.

Source

fn difference_with(&mut self, other: &Self)

Subtracts another bitset from this one, modifying self in place.

Source

fn symmetric_difference_with(&mut self, other: &Self)

Subtracts this bitset from another one, modifying self in place.

Source

fn negate(&mut self)

Negates this bitset, modifying self in place.

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 BitStoreMut for u8

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl BitStoreMut for u16

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl BitStoreMut for u32

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl BitStoreMut for u64

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl BitStoreMut for u128

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl BitStoreMut for usize

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl<'a, T: BitStoreMut> BitStoreMut for &'a mut T

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl<T: BitStoreMut> BitStoreMut for Box<T>

Available on crate feature alloc only.
Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Source§

impl<T: BitStoreMut, const N: usize> BitStoreMut for [T; N]

Source§

unsafe fn set(&mut self, index: u32)

Source§

unsafe fn unset(&mut self, index: u32)

Source§

fn union_with(&mut self, other: &Self)

Source§

fn intersect_with(&mut self, other: &Self)

Source§

fn difference_with(&mut self, other: &Self)

Source§

fn symmetric_difference_with(&mut self, other: &Self)

Source§

fn negate(&mut self)

Implementors§