pub trait BitsIndex<T> {
// Required methods
fn bit(value: T, index: Self) -> bool;
fn bits<R>(value: T, range: R) -> <T as Bits>::Bits
where T: Bits,
R: RangeBounds<Self>;
fn set_bit(value: &mut T, index: Self, bit: bool);
fn set_bits<R>(value: &mut T, range: R, bits: <T as Bits>::Bits)
where T: Bits,
R: RangeBounds<Self>;
}
Expand description
Trait for types that can be used to index the bits of T
.
Required Methods§
Sourcefn bits<R>(value: T, range: R) -> <T as Bits>::Bitswhere
T: Bits,
R: RangeBounds<Self>,
fn bits<R>(value: T, range: R) -> <T as Bits>::Bitswhere
T: Bits,
R: RangeBounds<Self>,
See Bits::bits
.
Sourcefn set_bit(value: &mut T, index: Self, bit: bool)
fn set_bit(value: &mut T, index: Self, bit: bool)
See Bits::set_bit
.
Sourcefn set_bits<R>(value: &mut T, range: R, bits: <T as Bits>::Bits)where
T: Bits,
R: RangeBounds<Self>,
fn set_bits<R>(value: &mut T, range: R, bits: <T as Bits>::Bits)where
T: Bits,
R: RangeBounds<Self>,
See Bits::set_bits
.
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.