mirror of
https://github.com/rust-lang/rust
synced 2024-10-14 12:33:57 +00:00
std: impl of Write
for &mut [u8]
: document the buffer full error
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
parent
c4926d01ad
commit
db5d697004
|
@ -306,6 +306,10 @@ fn consume(&mut self, amt: usize) {
|
|||
///
|
||||
/// Note that writing updates the slice to point to the yet unwritten part.
|
||||
/// The slice will be empty when it has been completely overwritten.
|
||||
///
|
||||
/// If the number of bytes to be written exceeds the size of the slice, write operations will
|
||||
/// return short writes: ultimately, `Ok(0)`; in this situation, `write_all` returns an error of
|
||||
/// kind `ErrorKind::WriteZero`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl Write for &mut [u8] {
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue