Skip to main content

ChunkGetExt

Trait ChunkGetExt 

Source
pub trait ChunkGetExt<const BODY_SIZE: usize>: ChunkGet<BODY_SIZE> {
    // Provided methods
    fn joiner<R: JoinRef>(
        self,
        root: R,
    ) -> impl Future<Output = Result<GenericJoiner<Self, R::Mode, BODY_SIZE>>> + Send
       where Self: Sized + Clone + Send + Sync + 'static { ... }
    fn read_file<R: JoinRef>(
        self,
        root: R,
    ) -> impl Future<Output = Result<Vec<u8>>> + Send
       where Self: Sized + Clone + Send + Sync + 'static { ... }
}
Expand description

Extension methods for async chunk getters.

Uses JoinRef for unified plain/encrypted dispatch.

Provided Methods§

Source

fn joiner<R: JoinRef>( self, root: R, ) -> impl Future<Output = Result<GenericJoiner<Self, R::Mode, BODY_SIZE>>> + Send
where Self: Sized + Clone + Send + Sync + 'static,

Open a file for async reading.

Source

fn read_file<R: JoinRef>( self, root: R, ) -> impl Future<Output = Result<Vec<u8>>> + Send
where Self: Sized + Clone + Send + Sync + 'static,

Read entire file into memory asynchronously.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, const BODY_SIZE: usize> ChunkGetExt<BODY_SIZE> for T
where T: ChunkGet<BODY_SIZE>,