Commit 603377dd authored by Tobias Koppers's avatar Tobias Koppers

Add doc comment to ArcBytes Read impl explaining cursor semantics

parent 9c31bbda
......@@ -78,6 +78,8 @@ impl Debug for ArcBytes {
impl Eq for ArcBytes {}
/// Reading from an `ArcBytes` advances its internal data pointer, so it acts as a cursor.
/// After a `read()` call, `Deref` returns only the unconsumed (remaining) portion of the slice.
impl Read for ArcBytes {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
let available = &**self;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment