pub enum Message {
Callback(Box<Callback>),
NetworkScan(Sender<Vec<NetworkFound>>),
ChannelScan(Sender<Vec<EnergyScanResult>>),
Sent {
tag: u8,
sender: Sender<Result<Status, u8>>,
},
Terminate,
}Expand description
Messages exchanged with the NCP event handler.
The event handler receives raw EZSP callbacks, one-shot registration
requests for scans and outgoing message confirmations, and a termination
signal used by Ncp::terminate.
Variants§
Callback(Box<Callback>)
An incoming callback.
NetworkScan(Sender<Vec<NetworkFound>>)
Registers a receiver for the next active network scan.
ChannelScan(Sender<Vec<EnergyScanResult>>)
Registers a receiver for the next energy scan.
Sent
Registers a receiver for a messageSent callback with the given tag.
Fields
Terminate
Stops the event handler.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Message
impl !UnwindSafe for Message
impl Freeze for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more