Skip to main content

WindowSource

Trait WindowSource 

Source
pub trait WindowSource {
    // Required method
    fn read_window(
        &mut self,
        offset: u64,
        len: u64,
    ) -> Result<Vec<u8>, PackError>;
}
Expand description

A synchronous source serving exact ranges, without retaining earlier windows.

Required Methods§

Source

fn read_window(&mut self, offset: u64, len: u64) -> Result<Vec<u8>, PackError>

Read exactly len bytes beginning at offset.

§Errors

Return a pack error for a short read or source failure.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl WindowSource for &[u8]

Source§

fn read_window(&mut self, offset: u64, len: u64) -> Result<Vec<u8>, PackError>

Implementors§