MCPcopy Create free account
hub / github.com/bytecodealliance/system-interface / write_all_vectored

Method write_all_vectored

src/io/io_ext.rs:102–113  ·  view source on GitHub ↗

Is to `write_vectored` what `write_all` is to `write`.

(&self, mut bufs: &mut [IoSlice])

Source from the content-addressed store, hash-verified

100
101 /// Is to `write_vectored` what `write_all` is to `write`.
102 fn write_all_vectored(&self, mut bufs: &mut [IoSlice]) -> io::Result<()> {
103 // TODO: Use [rust-lang/rust#70436] once it stabilizes.
104 // [rust-lang/rust#70436]: https://github.com/rust-lang/rust/issues/70436
105 while !bufs.is_empty() {
106 match self.write_vectored(bufs) {
107 Ok(nwritten) => bufs = advance(bufs, nwritten),
108 Err(ref e) if e.kind() == io::ErrorKind::Interrupted => (),
109 Err(e) => return Err(e),
110 }
111 }
112 Ok(())
113 }
114
115 /// Writes a formatted string into this writer, returning any error
116 /// encountered.

Callers

nothing calls this directly

Implementers 1

io_ext.rssrc/io/io_ext.rs

Calls 2

write_vectoredMethod · 0.80
advanceFunction · 0.70

Tested by

no test coverage detected