Trait proc_bitfield::BitRange
source · pub trait BitRange<T> {
// Required methods
fn bit_range<const START: usize, const END: usize>(self) -> T;
fn set_bit_range<const START: usize, const END: usize>(
self,
value: T
) -> Self;
}
Expand description
A trait to read or modify a range of bits inside a value.
Required Methods§
sourcefn bit_range<const START: usize, const END: usize>(self) -> T
fn bit_range<const START: usize, const END: usize>(self) -> T
Read the START..END
bit range (with END
excluded) inside self
as a value of type T
.
sourcefn set_bit_range<const START: usize, const END: usize>(self, value: T) -> Self
fn set_bit_range<const START: usize, const END: usize>(self, value: T) -> Self
Set the START..END
bit range (with END
excluded) inside self
to a value of type T
.
Object Safety§
This trait is not object safe.