Struct p25::bits::Dibit
[−]
[src]
pub struct Dibit(_);
Two bits.
Methods
impl Dibit
[src]
pub fn new(bits: u8) -> Dibit
[src]
Construct a new Dibit
with the two given bits in the LSB position.
pub fn bits(&self) -> u8
[src]
Get the wrapped dibit, which is guaranteed to have only 2 LSBs.
pub fn hi(&self) -> u8
[src]
Get the MSB.
pub fn lo(&self) -> u8
[src]
Get the LSB.
Trait Implementations
impl Copy for Dibit
[src]
impl Clone for Dibit
[src]
fn clone(&self) -> Dibit
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Dibit
[src]
impl Debug for Dibit
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Dibit
[src]
fn eq(&self, __arg_0: &Dibit) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Dibit) -> bool
[src]
This method tests for !=
.