pub struct NumberOfOptions(/* private fields */);Expand description
Two 4-bit fields packed into a single byte.
Used for the NumberOfOptions field in entries, which contains the number of options in the first and second option runs (each 4 bits, values 0-15).
Implementations§
Source§impl NumberOfOptions
impl NumberOfOptions
Sourcepub fn from_options(options1: u8, options2: u8) -> Self
pub fn from_options(options1: u8, options2: u8) -> Self
Sourcepub fn options1(&self) -> u8
pub fn options1(&self) -> u8
Gets the number of options for the first option run (high nibble).
§Returns
Number of options (0-15)
Sourcepub fn options2(&self) -> u8
pub fn options2(&self) -> u8
Gets the number of options for the second option run (low nibble).
§Returns
Number of options (0-15)
Sourcepub fn set_options1(&mut self, value: u8)
pub fn set_options1(&mut self, value: u8)
Sets the number of options for the first option run.
§Parameters
value- Number of options (0-15, will be masked)
Sourcepub fn set_options2(&mut self, value: u8)
pub fn set_options2(&mut self, value: u8)
Sets the number of options for the second option run.
§Parameters
value- Number of options (0-15, will be masked)
Trait Implementations§
Source§impl Clone for NumberOfOptions
impl Clone for NumberOfOptions
Source§fn clone(&self) -> NumberOfOptions
fn clone(&self) -> NumberOfOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumberOfOptions
impl Debug for NumberOfOptions
Source§impl PartialEq for NumberOfOptions
impl PartialEq for NumberOfOptions
impl Copy for NumberOfOptions
impl Eq for NumberOfOptions
impl StructuralPartialEq for NumberOfOptions
Auto Trait Implementations§
impl Freeze for NumberOfOptions
impl RefUnwindSafe for NumberOfOptions
impl Send for NumberOfOptions
impl Sync for NumberOfOptions
impl Unpin for NumberOfOptions
impl UnwindSafe for NumberOfOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more