File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ pub trait Read {
386
386
/// Pull some bytes from this source into the specified buffer.
387
387
///
388
388
/// This is equivalent to the `read` method, except that it is passed a `ReadBuf` rather than `[u8]` to allow use
389
- /// with uninitialized buffers.
389
+ /// with uninitialized buffers. The new data will be appended to any existing contents of `buf`.
390
390
///
391
391
/// The default implementation delegates to `read`.
392
392
fn read_buf (& mut self , buf : & mut ReadBuf <'_ >) -> io :: Result <()> {
@@ -558,6 +558,19 @@ impl<'a> ReadBufs<'a> {
558
558
559
559
...
560
560
}
561
+
562
+ pub trait Read {
563
+ /// Pull some bytes from this source into the specified set of buffers.
564
+ ///
565
+ /// This is equivalent to the `read_vectored` method, except that it is passed a `ReadBufs` rather than
566
+ /// `[IoSliceMut]` to allow use with uninitialized buffers. The new data will be appended to any existing contents
567
+ /// of `bufs`.
568
+ ///
569
+ /// The default implementation delegates to `read_vectored`.
570
+ fn read_buf_vectored (& mut self , bufs : & mut ReadBufs <'_ >) -> io :: Result <()> {
571
+ ...
572
+ }
573
+ }
561
574
```
562
575
563
576
# Drawbacks
You can’t perform that action at this time.
0 commit comments