pub struct PositionReader<R: PositionRead> { /* private fields */ }Expand description
PositionReader implements oio::Read based on PositionRead.
Implementations§
Source§impl<R: PositionRead> PositionReader<R>
impl<R: PositionRead> PositionReader<R>
Sourcepub fn new(inner: R) -> Self
pub fn new(inner: R) -> Self
Create a new PositionReader.
Sourcepub fn with_max_buf_size(self, buf_size: usize) -> Self
pub fn with_max_buf_size(self, buf_size: usize) -> Self
Set the maximum buffer size used by PositionReader.
Sourcepub fn into_inner(self) -> R
pub fn into_inner(self) -> R
Consume the reader and return the inner PositionRead.
§Panics
Panics if there are active streams that still share the inner reader.
Trait Implementations§
Source§impl<R: PositionRead> Read for PositionReader<R>
impl<R: PositionRead> Read for PositionReader<R>
Auto Trait Implementations§
impl<R> Freeze for PositionReader<R>
impl<R> RefUnwindSafe for PositionReader<R>where
R: RefUnwindSafe,
impl<R> Send for PositionReader<R>
impl<R> Sync for PositionReader<R>
impl<R> Unpin for PositionReader<R>
impl<R> UnsafeUnpin for PositionReader<R>
impl<R> UnwindSafe for PositionReader<R>where
R: RefUnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReadDyn for T
impl<T> ReadDyn for T
Source§fn open_dyn(
&self,
range: BytesRange,
) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + Send + '_>>
fn open_dyn( &self, range: BytesRange, ) -> Pin<Box<dyn Future<Output = Result<(RpRead, Box<dyn ReadStreamDyn>), Error>> + Send + '_>>
The dyn version of
Read::open.