Trait Write

Source
pub trait Write: Debug {
    type Error: WriteError;

    // Required methods
    fn poll_write(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        bytes: &[u8],
    ) -> Poll<Result<usize, Self::Error>>;
    fn poll_shutdown(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(), Self::Error>>;
}

Required Associated Types§

Required Methods§

Source

fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, bytes: &[u8], ) -> Poll<Result<usize, Self::Error>>

Source

fn poll_shutdown( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Implementations on Foreign Types§

Source§

impl<A: ?Sized + Write + Unpin> Write for &mut A

Source§

type Error = <A as Write>::Error

Source§

fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, bytes: &[u8], ) -> Poll<Result<usize, Self::Error>>

Source§

fn poll_shutdown( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

Implementors§