pub enum TcpPeerState {
Connecting {
socket_addr: SocketAddr,
},
AwaitingPeerConnection {
socket_addr: SocketAddr,
},
Connected {
socket_addr: SocketAddr,
stream: Arc<Mutex<Option<(Sender<Vec<u8>>, Receiver<Vec<u8>>)>>>,
},
Disconnected {
socket_addr: SocketAddr,
at: SystemTime,
reason: TcpDisconnectReason,
},
}Variants§
Connecting
Fields
§
socket_addr: SocketAddrAwaitingPeerConnection
Fields
§
socket_addr: SocketAddrConnected
Disconnected
Trait Implementations§
Source§impl Clone for TcpPeerState
impl Clone for TcpPeerState
Source§fn clone(&self) -> TcpPeerState
fn clone(&self) -> TcpPeerState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TcpPeerState
impl !RefUnwindSafe for TcpPeerState
impl Send for TcpPeerState
impl Sync for TcpPeerState
impl Unpin for TcpPeerState
impl !UnwindSafe for TcpPeerState
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