pub struct TCPPeer<T> {
pub addr: SocketAddr,
pub sender: Sender<State>,
/* private fields */
}
Fields§
§addr: SocketAddr
§sender: Sender<State>
Implementations§
Source§impl<T> TCPPeer<T>
impl<T> TCPPeer<T>
Sourcepub fn addr(&self) -> SocketAddr
pub fn addr(&self) -> SocketAddr
ipaddress
Sourcepub fn is_disconnect(&self) -> bool
pub fn is_disconnect(&self) -> bool
是否断线
Sourcepub async fn disconnect(&self) -> Result<()>
pub async fn disconnect(&self) -> Result<()>
掐线
Auto Trait Implementations§
impl<T> !Freeze for TCPPeer<T>
impl<T> RefUnwindSafe for TCPPeer<T>where
T: RefUnwindSafe,
impl<T> Send for TCPPeer<T>where
T: Send,
impl<T> Sync for TCPPeer<T>where
T: Sync,
impl<T> Unpin for TCPPeer<T>where
T: Unpin,
impl<T> UnwindSafe for TCPPeer<T>where
T: 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