pub struct HttpRangeReader { /* private fields */ }Expand description
Blocking HTTP(S) range reader for remote COG files.
A synchronous front for ObjectStoreRangeReader (see the module docs for what that means
on async threads). Opening costs one ranged GET; the first 16 KiB are kept in memory.
Implementations§
Trait Implementations§
Source§impl RangeReader for HttpRangeReader
impl RangeReader for HttpRangeReader
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 !RefUnwindSafe for HttpRangeReader
impl !UnwindSafe for HttpRangeReader
impl Freeze for HttpRangeReader
impl Send for HttpRangeReader
impl Sync for HttpRangeReader
impl Unpin for HttpRangeReader
impl UnsafeUnpin for HttpRangeReader
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