[−][src]Trait io::Write
Associated Types
type Err
Required methods
Loading content...Provided methods
fn write(&mut self, buf: &[T]) -> Result<usize, Self::Err>
w.write(buf) = self.writev(&[buf])
fn writev(&mut self, bufs: &[&[T]]) -> Result<usize, 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.
May block if no data can be written when called.
If this returns 0 data written, the possibilities are these:
bufs.all(|buf| buf.len() == 0)
- The writer reached some end, and can unlikely consume further bytes, at least temporarily.
fn write_all(&mut self, buf: &[T]) -> Result<(), (Self::Err, usize)> where
Self::Err: From<EndOfFile>,
Self::Err: From<EndOfFile>,
Push buf.len()
data to this sink from given buffer; return ()
if so many data were actually written, or a failure and how many data were written before the failure.
fn write_all_e(
&mut self,
buf: &[T]
) -> Result<(), (Either<EndOfFile, Self::Err>, usize)>
&mut self,
buf: &[T]
) -> Result<(), (Either<EndOfFile, Self::Err>, usize)>
Push buf.len()
data to this sink from given buffer; return ()
if so many data were actually written, or a failure and how many data were written before the failure.
Implementors
impl<'a, T: Copy, W: ?Sized + DerefMut> Write<T> for W where
W::Target: Write<T>,
[src]
W::Target: Write<T>,