Struct AcceptToken
pub struct AcceptToken { /* private fields */ }Expand description
A connection attempt accepted from a [TcpListener], returned by
[TcpListener::accept].
Pass it to TcpSocket::accept to set up a socket for it.
Dropping the token forgets the attempt. The client retransmits its SYN, which queues the attempt on the listener again.
Implementations§
§impl AcceptToken
impl AcceptToken
pub fn local_endpoint(&self) -> Endpoint
pub fn local_endpoint(&self) -> Endpoint
The local endpoint the client is connecting to.
pub fn remote_endpoint(&self) -> Endpoint
pub fn remote_endpoint(&self) -> Endpoint
The remote endpoint the connection attempt comes from.
Trait Implementations§
§impl Debug for AcceptToken
impl Debug for AcceptToken
Auto Trait Implementations§
impl Freeze for AcceptToken
impl RefUnwindSafe for AcceptToken
impl Send for AcceptToken
impl Sync for AcceptToken
impl Unpin for AcceptToken
impl UnsafeUnpin for AcceptToken
impl UnwindSafe for AcceptToken
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