Struct proc_bitfield::example::BitRanges
source · [−]pub struct BitRanges(pub u16);
Expand description
A bitfield showcasing how to specify bit ranges.
Tuple Fields
0: u16
Implementations
sourceimpl BitRanges
impl BitRanges
pub fn whole_bitfield(&self) -> u16
pub fn with_whole_bitfield(self, value: u16) -> Self
pub fn set_whole_bitfield(&mut self, value: u16)
pub fn inclusive_range(&self) -> u8
pub fn with_inclusive_range(self, value: u8) -> Self
pub fn set_inclusive_range(&mut self, value: u8)
pub fn exclusive_range(&self) -> u8
pub fn with_exclusive_range(self, value: u8) -> Self
pub fn set_exclusive_range(&mut self, value: u8)
pub fn start_and_length(&self) -> u8
pub fn with_start_and_length(self, value: u8) -> Self
pub fn set_start_and_length(&mut self, value: u8)
pub fn single_bit_inclusive_range(&self) -> u8
pub fn with_single_bit_inclusive_range(self, value: u8) -> Self
pub fn set_single_bit_inclusive_range(&mut self, value: u8)
pub fn single_bit_exclusive_range(&self) -> u8
pub fn with_single_bit_exclusive_range(self, value: u8) -> Self
pub fn set_single_bit_exclusive_range(&mut self, value: u8)
pub fn single_bit_start_and_length(&self) -> u8
pub fn with_single_bit_start_and_length(self, value: u8) -> Self
pub fn set_single_bit_start_and_length(&mut self, value: u8)
pub fn flag(&self) -> bool
pub fn with_flag(self, value: bool) -> Self
pub fn set_flag(&mut self, value: bool)
Trait Implementations
impl Copy for BitRanges
impl Eq for BitRanges
impl StructuralEq for BitRanges
impl StructuralPartialEq for BitRanges
Auto Trait Implementations
impl RefUnwindSafe for BitRanges
impl Send for BitRanges
impl Sync for BitRanges
impl Unpin for BitRanges
impl UnwindSafe for BitRanges
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more