pub trait WriteOwned {
// Required methods
async fn write_owned(
&mut self,
buf: impl Into<Piece>,
) -> BufResult<usize, Piece>;
async fn shutdown(&mut self) -> Result<()>;
// Provided methods
async fn write_all_owned(&mut self, buf: impl Into<Piece>) -> Result<()> { ... }
async fn writev_owned(&mut self, list: &PieceList) -> Result<usize> { ... }
async fn writev_all_owned(&mut self, list: PieceList) -> Result<()> { ... }
}Required Methods§
Provided Methods§
Sourceasync fn write_all_owned(&mut self, buf: impl Into<Piece>) -> Result<()>
async fn write_all_owned(&mut self, buf: impl Into<Piece>) -> Result<()>
Write a single buffer, re-trying the write if the kernel does a partial write.
Sourceasync fn writev_owned(&mut self, list: &PieceList) -> Result<usize>
async fn writev_owned(&mut self, list: &PieceList) -> Result<usize>
Write a list of buffers, taking ownership for the duration of the write. Might perform a partial write, see [WriteOwned::writev_all]
Sourceasync fn writev_all_owned(&mut self, list: PieceList) -> Result<()>
async fn writev_all_owned(&mut self, list: PieceList) -> Result<()>
Write a list of buffers, re-trying the write if the kernel does a partial write.
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.