pub enum StreamEvent {
Announced(String),
Message {
from: String,
body: Vec<u8>,
},
Closed(CloseReason),
}Expand description
What one direction of a stream yielded, in order.
Variants§
Announced(String)
The preamble verified. The peer is announced to the core under this
address, the derived one, never a claimed string: it is what
wifi_direct_peer_connected takes.
Message
A message body from the announced peer, to hand to the core attributed
to from: what wifi_direct_message_received takes.
Fields
Closed(CloseReason)
The stream is closed. Always the last event a reader yields, and nothing after it is delivered. Whether the peer was announced before this decides whether the host reports it lost.
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§impl Debug for StreamEvent
impl Debug for StreamEvent
impl Eq for StreamEvent
Source§impl PartialEq for StreamEvent
impl PartialEq for StreamEvent
impl StructuralPartialEq for StreamEvent
Auto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEvent
impl UnwindSafe for StreamEvent
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