pub enum ProtocolEvent {
Message(Vec<u8>),
Shutdown,
}Expand description
Protocol event used internally by karyon. User code reads
messages via PeerConn::recv which yields Vec<u8> directly and
surfaces shutdown as Err(PeerShutdown).
Variants§
Message(Vec<u8>)
Message event, contains a vector of bytes.
Shutdown
Shutdown event signals the protocol to gracefully shut down.
Trait Implementations§
Source§impl AsEventValue for ProtocolEvent
impl AsEventValue for ProtocolEvent
Source§impl Clone for ProtocolEvent
impl Clone for ProtocolEvent
Auto Trait Implementations§
impl Freeze for ProtocolEvent
impl RefUnwindSafe for ProtocolEvent
impl Send for ProtocolEvent
impl Sync for ProtocolEvent
impl Unpin for ProtocolEvent
impl UnsafeUnpin for ProtocolEvent
impl UnwindSafe for ProtocolEvent
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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