We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Write
&mut [u8]
1 parent c4926d0 commit db5d697Copy full SHA for db5d697
library/std/src/io/impls.rs
@@ -306,6 +306,10 @@ impl BufRead for &[u8] {
306
///
307
/// Note that writing updates the slice to point to the yet unwritten part.
308
/// The slice will be empty when it has been completely overwritten.
309
+///
310
+/// If the number of bytes to be written exceeds the size of the slice, write operations will
311
+/// return short writes: ultimately, `Ok(0)`; in this situation, `write_all` returns an error of
312
+/// kind `ErrorKind::WriteZero`.
313
#[stable(feature = "rust1", since = "1.0.0")]
314
impl Write for &mut [u8] {
315
#[inline]
0 commit comments