pub struct ByteChunk {
pub bytes: Vec<u8>,
pub offset: u64,
pub eof: bool,
}Expand description
One ranged read’s result.
Fields§
§bytes: Vec<u8>The bytes read (possibly fewer than requested).
offset: u64The offset the bytes start at.
eof: boolTrue when this chunk ends at the end of a closed stream. For a
parked read this is equivalent to bytes.is_empty() — the
read(2) contract.
Implementations§
Source§impl ByteChunk
impl ByteChunk
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
The store-convention encoding: the bytes themselves. Empty bytes from a blocking read mean end-of-stream.
Sourcepub fn next_offset(&self) -> u64
pub fn next_offset(&self) -> u64
The cursor for the next read.
Trait Implementations§
impl Eq for ByteChunk
impl StructuralPartialEq for ByteChunk
Auto Trait Implementations§
impl Freeze for ByteChunk
impl RefUnwindSafe for ByteChunk
impl Send for ByteChunk
impl Sync for ByteChunk
impl Unpin for ByteChunk
impl UnsafeUnpin for ByteChunk
impl UnwindSafe for ByteChunk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more