pub struct Complete<'a, S> { /* private fields */ }
Expand description
Implementations§
Trait Implementations§
Source§impl<C> Reader for Complete<'_, C>where
C: Storage,
impl<C> Reader for Complete<'_, C>where
C: Storage,
Source§fn current_offset(&self) -> VarInt
fn current_offset(&self) -> VarInt
Returns the currently read offset for the stream
Source§fn final_offset(&self) -> Option<VarInt>
fn final_offset(&self) -> Option<VarInt>
Returns the final offset for the stream
Source§fn has_buffered_fin(&self) -> bool
fn has_buffered_fin(&self) -> bool
Returns
true
if the reader has the final offset bufferedSource§fn is_consumed(&self) -> bool
fn is_consumed(&self) -> bool
Returns
true
if the reader is finished producing dataSource§fn skip_until(&mut self, offset: VarInt) -> Result<(), Self::Error>
fn skip_until(&mut self, offset: VarInt) -> Result<(), Self::Error>
Skips the data in the reader until
offset
is reached, or the reader storage is exhausted.Source§fn with_max_data(&mut self, max_data: VarInt) -> Limit<'_, Self>
fn with_max_data(&mut self, max_data: VarInt) -> Limit<'_, Self>
Limits the maximum offset that the caller can read from the reader
Source§fn with_read_limit(&mut self, max_buffered_len: usize) -> Limit<'_, Self>
fn with_read_limit(&mut self, max_buffered_len: usize) -> Limit<'_, Self>
Limits the maximum amount of data that the caller can read from the reader
Source§fn with_empty_buffer(&self) -> Empty<'_, Self>
fn with_empty_buffer(&self) -> Empty<'_, Self>
Return an empty view onto the reader, with no change in current offset
Source§fn with_checks(&mut self) -> Checked<'_, Self>
fn with_checks(&mut self) -> Checked<'_, Self>
Enables checking the reader for correctness invariants Read more
Source§impl<S> Storage for Complete<'_, S>where
S: Storage,
impl<S> Storage for Complete<'_, S>where
S: Storage,
type Error = <S as Storage>::Error
Source§fn buffered_len(&self) -> usize
fn buffered_len(&self) -> usize
Returns the length of the chunk
Source§fn buffer_is_empty(&self) -> bool
fn buffer_is_empty(&self) -> bool
Returns if the chunk is empty
Source§fn read_chunk(&mut self, watermark: usize) -> Result<Chunk<'_>, Self::Error>
fn read_chunk(&mut self, watermark: usize) -> Result<Chunk<'_>, Self::Error>
Reads the current contiguous chunk
Source§fn partial_copy_into<Dest>(
&mut self,
dest: &mut Dest,
) -> Result<Chunk<'_>, Self::Error>
fn partial_copy_into<Dest>( &mut self, dest: &mut Dest, ) -> Result<Chunk<'_>, Self::Error>
Copies the reader into
dest
, with a trailing chunk of bytes. Read moreSource§fn copy_into<Dest>(&mut self, dest: &mut Dest) -> Result<(), Self::Error>
fn copy_into<Dest>(&mut self, dest: &mut Dest) -> Result<(), Self::Error>
Copies the reader into
dest
. Read moreSource§fn full_copy(&mut self) -> FullCopy<'_, Self>
fn full_copy(&mut self) -> FullCopy<'_, Self>
Forces the entire reader to be copied, even when calling
partial_copy_into
. Read moreSource§fn track_read(&mut self) -> Tracked<'_, Self>
fn track_read(&mut self) -> Tracked<'_, Self>
Tracks the number of bytes read from the storage
Auto Trait Implementations§
impl<'a, S> Freeze for Complete<'a, S>
impl<'a, S> RefUnwindSafe for Complete<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Complete<'a, S>where
S: Send,
impl<'a, S> Sync for Complete<'a, S>where
S: Sync,
impl<'a, S> Unpin for Complete<'a, S>
impl<'a, S> !UnwindSafe for Complete<'a, S>
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