pub struct StatusFlags(/* private fields */);
Expand description
A struct used to describe the different interrupt events.
To instantiate an object with flags that have different values:
let flags = StatusFlags::default() // all flags are false
.with_rx_dr(true); // assert only `rx_dr` flags
Use StatusFlags::default
to instantiate all flags set to false.
Use StatusFlags::new
to instantiate all flags set to true.
Implementations§
Source§impl StatusFlags
impl StatusFlags
Source§impl StatusFlags
impl StatusFlags
Sourcepub fn new() -> Self
pub fn new() -> Self
A convenience constructor similar to StatusFlags::default
except
all fields are set to true
.
Sourcepub fn with_rx_dr(self, flag: bool) -> Self
pub fn with_rx_dr(self, flag: bool) -> Self
A flag to describe if RX Data Ready to read.
Sourcepub fn with_tx_ds(self, flag: bool) -> Self
pub fn with_tx_ds(self, flag: bool) -> Self
A flag to describe if TX Data Sent.
Sourcepub fn with_tx_df(self, flag: bool) -> Self
pub fn with_tx_df(self, flag: bool) -> Self
A flag to describe if TX Data Failed.
Trait Implementations§
Source§impl Clone for StatusFlags
impl Clone for StatusFlags
Source§fn clone(&self) -> StatusFlags
fn clone(&self) -> StatusFlags
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 StatusFlags
impl Debug for StatusFlags
Source§impl Default for StatusFlags
impl Default for StatusFlags
Source§impl Display for StatusFlags
impl Display for StatusFlags
Source§impl From<StatusFlags> for u8
impl From<StatusFlags> for u8
Source§fn from(v: StatusFlags) -> u8
fn from(v: StatusFlags) -> u8
Converts to this type from the input type.
Source§impl From<u8> for StatusFlags
impl From<u8> for StatusFlags
impl Copy for StatusFlags
Auto Trait Implementations§
impl Freeze for StatusFlags
impl RefUnwindSafe for StatusFlags
impl Send for StatusFlags
impl Sync for StatusFlags
impl Unpin for StatusFlags
impl UnwindSafe for StatusFlags
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