Skip to main content

SocketBind

Trait SocketBind 

Source
pub trait SocketBind: SocketOperation {
    // Required method
    fn socket_bind(
        &self,
        socket: &Self::Socket,
        address: SocketAddress,
        cancellation: &Cancellation,
    ) -> impl Future<Output = OperationResult<()>> + Send;
}
Expand description

Bind an existing socket to a local IP address.

Required Methods§

Source

fn socket_bind( &self, socket: &Self::Socket, address: SocketAddress, cancellation: &Cancellation, ) -> impl Future<Output = OperationResult<()>> + Send

Bind an existing socket to a local address. Port zero requests an OS-selected port, available through socket_local_address.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§