pub struct LocalRangeReader { /* private fields */ }Expand description
Local file range reader
Implementations§
Trait Implementations§
Source§impl RangeReader for LocalRangeReader
impl RangeReader for LocalRangeReader
Source§fn read_range(&self, offset: u64, length: usize) -> AnyResult<Vec<u8>>
fn read_range(&self, offset: u64, length: usize) -> AnyResult<Vec<u8>>
Read a range of bytes from the source Read more
Source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
Get a human-readable identifier for this source (for logging/errors)
Source§fn version(&self) -> Option<&str>
fn version(&self) -> Option<&str>
Token that changes when the content changes (see
AsyncRangeReader::version); None if unknown.Source§fn is_local(&self) -> bool
fn is_local(&self) -> bool
Check if this is a local file (fast random access) or remote (expensive reads)
Source§fn reads_inline(&self) -> bool
fn reads_inline(&self) -> bool
True when
read_range never blocks on I/O (e.g. in-memory data), so async adapters
may call it directly instead of moving it to a blocking thread.Auto Trait Implementations§
impl Freeze for LocalRangeReader
impl RefUnwindSafe for LocalRangeReader
impl Send for LocalRangeReader
impl Sync for LocalRangeReader
impl Unpin for LocalRangeReader
impl UnsafeUnpin for LocalRangeReader
impl UnwindSafe for LocalRangeReader
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more