Trait bitsetium::BitSet[][src]

pub trait BitSet: BitSetLimit {
    unsafe fn set_unchecked(&mut self, idx: usize);

    fn set(&mut self, idx: usize) { ... }
}
Expand description

Sets single bit. This trait should be implemented for all mutable bit-set.

Note that not all kind of bit-sets may support resetting bits.

Required methods

Set bit at specified index.

Safety

Calling with idx > MAX_SET_INDEX may trigger UB. For any idx <= MAX_SET_INDEX behavior is identical to set, but may produce better optimized code.

Implementations are encouraged to use debug assertions.

Provided methods

Sets bit at specified index.

Panics

Calling with idx > MAX_SET_INDEX should panic.

Implementations are encouraged to use assertions.

Implementations on Foreign Types

Implementors