pub trait LimitBlobReader {
// Required method
fn copy_limited(
&self,
offset: u64,
size: u64,
w: &mut dyn Write,
) -> impl Future<Output = Result<u64>>;
}Expand description
Limited reads from a blob (starting from offset, up to size)
Required Methods§
Sourcefn copy_limited(
&self,
offset: u64,
size: u64,
w: &mut dyn Write,
) -> impl Future<Output = Result<u64>>
fn copy_limited( &self, offset: u64, size: u64, w: &mut dyn Write, ) -> impl Future<Output = Result<u64>>
Copies up to size bytes starting from offset into the passed writer.
The (sync) writer is assumed to be sufficiently non-blocking, so it can still be invoked from an async context.
Returns the number of bytes actually written.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.