Skip to main content

RandomAccessDataSource

Trait RandomAccessDataSource 

Source
pub(crate) trait RandomAccessDataSource {
    type Error;

    // Required method
    async fn read_range(
        &self,
        range: Range<usize>,
    ) -> Result<Vec<u8>, Self::Error>;
}
Expand description

A data source that supports random-access reads

Required Associated Types§

Source

type Error

Error returned when authentication fails on any read chunk, the wire bytes are shorter than the framing requires, or range exceeds the plaintext length.

Required Methods§

Source

async fn read_range(&self, range: Range<usize>) -> Result<Vec<u8>, Self::Error>

Decrypt the plaintext bytes covering range from the encrypted ciphertext byte stream.

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.

Implementors§