We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ReadBuf::uninit
1 parent a1520f5 commit 463502cCopy full SHA for 463502c
tokio/src/io/read_buf.rs
@@ -39,9 +39,11 @@ impl<'a> ReadBuf<'a> {
39
}
40
41
42
- /// Creates a new `ReadBuf` from a fully uninitialized buffer.
+ /// Creates a new `ReadBuf` from a buffer that may be uninitialized.
43
///
44
- /// Use `assume_init` if part of the buffer is known to be already initialized.
+ /// The internal cursor will mark the entire buffer as uninitialized. If
45
+ /// the buffer is known to be partially initialized, then use `assume_init`
46
+ /// to move the internal cursor.
47
#[inline]
48
pub fn uninit(buf: &'a mut [MaybeUninit<u8>]) -> ReadBuf<'a> {
49
ReadBuf {
0 commit comments