pub enum BehaviorOutput<B: Behavior> {
InterfaceCommand(InterfaceCommand<B::Message>),
ExternalEvent(B::Event),
}Expand description
Output produced by a Behavior, either a command for the interface or an
event for the external consumer.
Variants§
InterfaceCommand(InterfaceCommand<B::Message>)
A command to be dispatched to the network interface.
ExternalEvent(B::Event)
An event to be surfaced to the caller.
Trait Implementations§
Source§impl<B: Behavior> From<InterfaceCommand<<B as Behavior>::Message>> for BehaviorOutput<B>
impl<B: Behavior> From<InterfaceCommand<<B as Behavior>::Message>> for BehaviorOutput<B>
Source§fn from(cmd: InterfaceCommand<B::Message>) -> Self
fn from(cmd: InterfaceCommand<B::Message>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<B> Freeze for BehaviorOutput<B>
impl<B> RefUnwindSafe for BehaviorOutput<B>
impl<B> Send for BehaviorOutput<B>
impl<B> Sync for BehaviorOutput<B>
impl<B> Unpin for BehaviorOutput<B>
impl<B> UnsafeUnpin for BehaviorOutput<B>
impl<B> UnwindSafe for BehaviorOutput<B>
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