WriteHalf

Trait WriteHalf 

Source
pub trait WriteHalf: Debug {
    // Required method
    fn write(
        &mut self,
        buf: &[u8],
        fds: &[impl AsFd],
    ) -> impl Future<Output = Result<()>>;
}
Expand description

The write half of a socket.

Required Methods§

Source

fn write( &mut self, buf: &[u8], fds: &[impl AsFd], ) -> impl Future<Output = Result<()>>

Write to the socket.

The fds parameter contains file descriptors to send along with the data (std only).

The returned future has the same requirements as that of ReadHalf::read.

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§