pub trait StreamOps {
// Provided methods
fn set_tcp_notsent_lowat(&self, _notsent_lowat: u32) -> IoResult<()> { ... }
fn new_handle(&self) -> Box<dyn StreamOps + Send + Unpin> { ... }
}Expand description
Additional operations that can be performed on connected stream sockets.
Some operations provided by this trait set socket options (setsockopt()).
Some socket options cannot be set after a stream socket is connected,
so these options are not provided by this trait.
Instead, they should be set through options given to
NetStreamProvider::connect() or NetStreamProvider::listen().
For example, see the options provided by TcpListenOptions.
Provided Methods§
Sourcefn set_tcp_notsent_lowat(&self, _notsent_lowat: u32) -> IoResult<()>
fn set_tcp_notsent_lowat(&self, _notsent_lowat: u32) -> IoResult<()>
Set the TCP_NOTSENT_LOWAT socket option, if this Stream is a TCP stream.
Implementations should return an UnsupportedStreamOp IO error
if the stream is not a TCP stream,
and on platforms where the operation is not supported.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl StreamOps for TcpStream
Available on crate feature async-std and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.
impl StreamOps for TcpStream
async-std and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.Source§impl StreamOps for TcpStream
Available on crate feature smol and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.
impl StreamOps for TcpStream
smol and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.Source§impl StreamOps for UnixStream
Available on Unix and crate feature async-std and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.
impl StreamOps for UnixStream
async-std and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.Source§impl StreamOps for UnixStream
Available on Unix and crate feature smol and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.
impl StreamOps for UnixStream
smol and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.Source§impl<S: AsyncRead + AsyncWrite + StreamOps + Unpin> StreamOps for TlsStream<S>
Available on crate feature native-tls and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.
impl<S: AsyncRead + AsyncWrite + StreamOps + Unpin> StreamOps for TlsStream<S>
native-tls and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.Source§impl<S: StreamOps> StreamOps for TlsStream<S>
Available on crate feature rustls and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.
impl<S: StreamOps> StreamOps for TlsStream<S>
rustls and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.Implementors§
impl StreamOps for FakeStream
impl StreamOps for NoOpStreamOpsHandle
impl StreamOps for Stream
impl StreamOps for UnimplementedTls
async-std or smol or tokio) and (crate features native-tls or rustls) only.impl<S: StreamOps> StreamOps for RustlsServerStream<S>
rustls and crate feature tls-server and (crate features async-std or smol or tokio) and (crate features native-tls or rustls) only.