Crate range_reader
source · [−]Expand description
Offers two structs:
RangedReader
, that implementsstd::io::Read
andstd::io::Seek
from a function returning aVec<u8>
from a ranged request(start, length)
.RangedAsyncReader
that implements [futures::io::AsyncRead
] and [futures::io::AsyncRead
] from a asynchronous function returning (a future of)Vec<u8>
from a ranged request(start, length)
.
A common use use-case for this crate is to perform ranged queries from remote blob storages such as AWS s3, Azure blob, and Google’s cloud storage.
Structs
A range of bytes with a known starting position.
A struct that converts RangedFuture
to a AsyncRead + AsyncSeek
with an internal buffer.
Implements Read + Seek
for a (blocking) function that reads ranges of bytes.
Type Definitions
A function that returns a [BoxFuture
] of RangeOutput
.
For example, an async request to return a range of bytes from a blob from the internet.