WriteOwned

Trait WriteOwned 

Source
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§

Source

async fn write_owned( &mut self, buf: impl Into<Piece>, ) -> BufResult<usize, Piece>

Write a single buffer, taking ownership for the duration of the write. Might perform a partial write, see [WriteOwned::write_all]

Source

async fn shutdown(&mut self) -> Result<()>

Shuts down the write end of this socket. This flushes any data that may not have been send.

Provided Methods§

Source

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.

Source

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]

Source

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.

Implementors§