Skip to main content

ArchiveReadAt

Trait ArchiveReadAt 

Source
pub trait ArchiveReadAt:
    Send
    + Sync
    + 'static {
    // Required methods
    fn len(&self) -> Result<u64, FormatError>;
    fn read_exact_at(
        &self,
        offset: u64,
        buf: &mut [u8],
    ) -> Result<(), FormatError>;

    // Provided method
    fn is_empty(&self) -> Result<bool, FormatError> { ... }
}

Required Methods§

Source

fn len(&self) -> Result<u64, FormatError>

Source

fn read_exact_at(&self, offset: u64, buf: &mut [u8]) -> Result<(), FormatError>

Provided Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ArchiveReadAt for File

Source§

fn len(&self) -> Result<u64, FormatError>

Source§

fn read_exact_at(&self, offset: u64, buf: &mut [u8]) -> Result<(), FormatError>

Source§

impl ArchiveReadAt for Vec<u8>

Source§

fn len(&self) -> Result<u64, FormatError>

Source§

fn read_exact_at(&self, offset: u64, buf: &mut [u8]) -> Result<(), FormatError>

Source§

impl<T: ArchiveReadAt + ?Sized> ArchiveReadAt for Arc<T>

Source§

fn len(&self) -> Result<u64, FormatError>

Source§

fn read_exact_at(&self, offset: u64, buf: &mut [u8]) -> Result<(), FormatError>

Implementors§