[][src]Trait io::TryWrite

pub trait TryWrite<T: Copy> {
    type Err;
    fn try_write(
        &mut self,
        buf: &[T]
    ) -> Result<Result<usize, EndOfFile>, Self::Err> { ... }
fn try_writev(
        &mut self,
        bufs: &[&[T]]
    ) -> Result<Result<usize, EndOfFile>, Self::Err> { ... } }

Associated Types

type Err

Loading content...

Provided methods

fn try_write(
    &mut self,
    buf: &[T]
) -> Result<Result<usize, EndOfFile>, Self::Err>

w.try_write(buf) = w.try_writev(&[buf])

fn try_writev(
    &mut self,
    bufs: &[&[T]]
) -> Result<Result<usize, EndOfFile>, Self::Err>

Push some data, at most bufs.fold(0, |n, buf| n+buf.len()), to this sink from given buffers; return how many data were actually written, or a failure. If no data can be written when called, return 0 rather than wait.

Loading content...

Implementors

Loading content...