pub trait FramedWrite {
type WriteAllFut<'write>: Future<Output = Result<()>> + 'write
where Self: 'write;
// Required method
fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteAllFut<'a>;
}
Required Associated Types§
type WriteAllFut<'write>: Future<Output = Result<()>> + 'write where Self: 'write
Required Methods§
Sourcefn write_all<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteAllFut<'a>
fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteAllFut<'a>
Writes an entire buffer into this stream.
§Cancel safety
This method is not cancellation safe. If it is used as the event
in a tokio::select!
statement and some other
branch completes first, then the provided buffer may have been
partially written, but future calls to write_all
will start over
from the beginning of the buffer.
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.