pub trait Listen {
type Event: BitFlag;
// Required methods
fn listen(&mut self, event: impl Into<BitFlags<Self::Event>>);
fn listen_only(&mut self, event: impl Into<BitFlags<Self::Event>>);
fn unlisten(&mut self, event: impl Into<BitFlags<Self::Event>>);
// Provided methods
fn listen_all(&mut self) { ... }
fn unlisten_all(&mut self) { ... }
}Required Associated Types§
Required Methods§
Sourcefn listen(&mut self, event: impl Into<BitFlags<Self::Event>>)
fn listen(&mut self, event: impl Into<BitFlags<Self::Event>>)
Start listening for Events
Note, you will also have to enable the appropriate interrupt in the NVIC to start receiving events.
Sourcefn listen_only(&mut self, event: impl Into<BitFlags<Self::Event>>)
fn listen_only(&mut self, event: impl Into<BitFlags<Self::Event>>)
Start listening for Events, stop all other
Note, you will also have to enable the appropriate interrupt in the NVIC to start receiving events.
Provided Methods§
Sourcefn listen_all(&mut self)
fn listen_all(&mut self)
Start listening all Events
Sourcefn unlisten_all(&mut self)
fn unlisten_all(&mut self)
Stop listening all Events
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.