pub(crate) trait PlaintextSink {
// Required methods
fn write(&mut self, buf: &[u8]) -> Result<usize>;
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize>;
fn flush(&mut self) -> Result<()>;
}Expand description
Internal trait implemented by the ServerConnection/ClientConnection
allowing them to be the subject of a Writer.
Required Methods§
fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize>
fn flush(&mut self) -> Result<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".