Trait opendal::raw::oio::BlockingRead

source ·
pub trait BlockingRead: Send + Sync {
    // Required method
    fn read_at(&self, offset: u64, limit: usize) -> Result<Buffer>;
}
Expand description

Read is the trait that OpenDAL returns to callers.

Required Methods§

source

fn read_at(&self, offset: u64, limit: usize) -> Result<Buffer>

Read data from the reader at the given offset with the given limit.

§Notes

Storage services should try to read as much as possible, only return bytes less than the limit while reaching the end of the file.

Implementations on Foreign Types§

source§

impl BlockingRead for ()

source§

fn read_at(&self, offset: u64, limit: usize) -> Result<Buffer>

source§

impl BlockingRead for Bytes

source§

fn read_at(&self, offset: u64, limit: usize) -> Result<Buffer>

source§

impl<T: BlockingRead + ?Sized> BlockingRead for Box<T>

Box<dyn BlockingRead> won’t implement BlockingRead automatically. To make BlockingReader work as expected, we must add this impl.

source§

fn read_at(&self, offset: u64, limit: usize) -> Result<Buffer>

Implementors§

source§

impl BlockingRead for Buffer

source§

impl<ONE, TWO, THREE, FOUR> BlockingRead for FourWays<ONE, TWO, THREE, FOUR>
where ONE: BlockingRead, TWO: BlockingRead, THREE: BlockingRead, FOUR: BlockingRead,

source§

impl<ONE: BlockingRead, TWO: BlockingRead> BlockingRead for TwoWays<ONE, TWO>

source§

impl<ONE: BlockingRead, TWO: BlockingRead, THREE: BlockingRead> BlockingRead for ThreeWays<ONE, TWO, THREE>