Skip to main content

WriteShutdown

Trait WriteShutdown 

Source
pub trait WriteShutdown {
    // Required method
    fn shutdown_write(&mut self) -> Result<()>;
}
Expand description

Settles adopted local-to-peer output at clean completion.

After final output is written and flushed, bounded completion and clean peer closure call shutdown_write once; a split writer is then dropped. Bounded completion reads the peer direction to its end before releasing the IO. Shutdown must settle output the IO still owns and report its failure, which fails the operation unless the peer direction ended cleanly (Lace-050). Cancellation and failure release the IO without shutdown.

Required Methods§

Source

fn shutdown_write(&mut self) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl WriteShutdown for Sender

Available on Unix only.

A pipe has no half-close: written bytes are kernel-owned, and dropping the split writer after shutdown closes the write end.

Source§

fn shutdown_write(&mut self) -> Result<()>

Source§

impl WriteShutdown for TcpStream

Source§

fn shutdown_write(&mut self) -> Result<()>

Source§

impl WriteShutdown for UnixStream

Available on Unix only.
Source§

fn shutdown_write(&mut self) -> Result<()>

Implementors§