Skip to main content

TcpSocketDestructionContext

Trait TcpSocketDestructionContext 

Source
pub trait TcpSocketDestructionContext: ReferenceNotifiers + InstantContext {
    // Required method
    fn defer_tcp_socket_destruction<I, S>(
        &self,
        result: RemoveResourceResult<S, Self::ReferenceReceiver<S>>,
    )
       where I: Ip,
             S: SocketDiagnosticsSeed<Output = TcpSocketDiagnostics<I, Self::Instant>> + Send;
}
Expand description

Allows passing a TCP socket to bindings, which can wait for it to be destroyed and then receive diagnostics information.

Required Methods§

Source

fn defer_tcp_socket_destruction<I, S>( &self, result: RemoveResourceResult<S, Self::ReferenceReceiver<S>>, )
where I: Ip, S: SocketDiagnosticsSeed<Output = TcpSocketDiagnostics<I, Self::Instant>> + Send,

Takes ownership of waiting for the last reference to the TCP socket to be dropped and then possibly generates diagnostics from the seed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§