Module opendal::raw::oio::into_reader
source · Expand description
into_reader will provide different implementations to convert into
oio::Read
- (Some(offset), Some(size)) => by_range
- (Some(offset), None) => by_offset
- (None, Some(size)) => by_tail
- (None, None) => by_offset
The main different is whether and when to call stat to get total
content length.
TODO
We only implement by_range so far.
We should implement other types so that they can be zero cost on non-seek cases.
For example, for by_full, we don’t need to do stat everytime. If
user call poll_read first, we can get the total_size from returning
reader. In this way, we can save 40ms in average for every s3 read call.
Structs
RangeReader that can do seek on non-seekable reader.
Functions
Convert given reader into
oio::Reader by range.Convert given fd into
oio::Reader.