Struct proc_bitfield::example::ConstAccessors
source · [−]pub struct ConstAccessors(pub u16);
Expand description
A bitfield showcasing const fn
support on nightly Rust.
Tuple Fields
0: u16
Implementations
sourceimpl ConstAccessors
impl ConstAccessors
pub const fn whole_bitfield(&self) -> u16
pub const fn with_whole_bitfield(self, value: u16) -> Self
pub const fn set_whole_bitfield(&mut self, value: u16)
pub const fn inclusive_range(&self) -> u8
pub const fn with_inclusive_range(self, value: u8) -> Self
pub const fn set_inclusive_range(&mut self, value: u8)
pub const fn exclusive_range(&self) -> u8
pub const fn with_exclusive_range(self, value: u8) -> Self
pub const fn set_exclusive_range(&mut self, value: u8)
pub const fn start_and_length(&self) -> u8
pub const fn with_start_and_length(self, value: u8) -> Self
pub const fn set_start_and_length(&mut self, value: u8)
pub const fn single_bit_inclusive_range(&self) -> u8
pub const fn with_single_bit_inclusive_range(self, value: u8) -> Self
pub const fn set_single_bit_inclusive_range(&mut self, value: u8)
pub const fn single_bit_exclusive_range(&self) -> u8
pub const fn with_single_bit_exclusive_range(self, value: u8) -> Self
pub const fn set_single_bit_exclusive_range(&mut self, value: u8)
pub const fn single_bit_start_and_length(&self) -> u8
pub const fn with_single_bit_start_and_length(self, value: u8) -> Self
pub const fn set_single_bit_start_and_length(&mut self, value: u8)
pub const fn flag(&self) -> bool
pub const fn with_flag(self, value: bool) -> Self
pub const fn set_flag(&mut self, value: bool)
Trait Implementations
sourceimpl Clone for ConstAccessors
impl Clone for ConstAccessors
sourcefn clone(&self) -> ConstAccessors
fn clone(&self) -> ConstAccessors
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ConstAccessors
impl Debug for ConstAccessors
sourceimpl PartialEq<ConstAccessors> for ConstAccessors
impl PartialEq<ConstAccessors> for ConstAccessors
sourcefn eq(&self, other: &ConstAccessors) -> bool
fn eq(&self, other: &ConstAccessors) -> bool
impl Copy for ConstAccessors
impl Eq for ConstAccessors
impl StructuralEq for ConstAccessors
impl StructuralPartialEq for ConstAccessors
Auto Trait Implementations
impl RefUnwindSafe for ConstAccessors
impl Send for ConstAccessors
impl Sync for ConstAccessors
impl Unpin for ConstAccessors
impl UnwindSafe for ConstAccessors
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