pub trait WriteTimeout {
// Required method
fn set_write_timeout(&self, timeout: Option<Duration>) -> Result<()>;
}Expand description
A blocking transport whose writes can be bounded in time, as the _until loops need when
the peer stops reading.
Implemented for TcpStream and &TcpStream. A transport that cannot time out
implements it as a no-op; a write the peer never drains then holds the loop past its
deadline.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".