pub enum SocketEvent<A> {
SessionOpened {
remote: A,
},
DataReceived {
remote: A,
data: Bytes,
},
SessionClosed {
remote: A,
reason: DisconnectReason,
},
}Expand description
An event surfaced by a SoeMultiplexer, tagged with the remote it concerns.
Variants§
SessionOpened
A session with remote has been established.
Fields
§
remote: AThe remote address of the opened session.
DataReceived
Application data was received from remote.
SessionClosed
A session with remote has terminated for the given reason.
Fields
§
remote: AThe remote address of the closed session.
§
reason: DisconnectReasonThe reason the session terminated.
Trait Implementations§
Source§impl<A: Clone> Clone for SocketEvent<A>
impl<A: Clone> Clone for SocketEvent<A>
Source§fn clone(&self) -> SocketEvent<A>
fn clone(&self) -> SocketEvent<A>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<A: Debug> Debug for SocketEvent<A>
impl<A: Debug> Debug for SocketEvent<A>
impl<A: Eq> Eq for SocketEvent<A>
Source§impl<A: PartialEq> PartialEq for SocketEvent<A>
impl<A: PartialEq> PartialEq for SocketEvent<A>
Source§fn eq(&self, other: &SocketEvent<A>) -> bool
fn eq(&self, other: &SocketEvent<A>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<A: PartialEq> StructuralPartialEq for SocketEvent<A>
Auto Trait Implementations§
impl<A> !Freeze for SocketEvent<A>
impl<A> RefUnwindSafe for SocketEvent<A>where
A: RefUnwindSafe,
impl<A> Send for SocketEvent<A>where
A: Send,
impl<A> Sync for SocketEvent<A>where
A: Sync,
impl<A> Unpin for SocketEvent<A>where
A: Unpin,
impl<A> UnsafeUnpin for SocketEvent<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for SocketEvent<A>where
A: UnwindSafe,
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