pub struct ConnectionInfo<A>(/* private fields */);Implementations§
Source§impl<A> ConnectionInfo<A>
impl<A> ConnectionInfo<A>
Sourcepub fn remote_address(&self) -> &A
pub fn remote_address(&self) -> &A
The peer’s remote address
Sourcepub fn time_established(&self) -> Instant
pub fn time_established(&self) -> Instant
Time the Connection was established
pub fn peer_certificates(&self) -> Option<&PeerCertificates>
Sourcepub fn id(&self) -> ConnectionId
pub fn id(&self) -> ConnectionId
A stable identifier for this connection
Sourcepub fn close(&self)
pub fn close(&self)
Trigger a graceful shutdown of this connection
In-flight requests are allowed to complete before the connection
closes. If the server’s Config::max_connection_age_grace is set,
the connection is forcefully closed once that grace period expires;
otherwise a request that never completes keeps the connection open
indefinitely.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for ConnectionInfo<A>
impl<A> RefUnwindSafe for ConnectionInfo<A>where
A: RefUnwindSafe,
impl<A> Send for ConnectionInfo<A>
impl<A> Sync for ConnectionInfo<A>
impl<A> Unpin for ConnectionInfo<A>
impl<A> UnsafeUnpin for ConnectionInfo<A>
impl<A> UnwindSafe for ConnectionInfo<A>where
A: RefUnwindSafe,
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