Struct box_format::BoxFileReader[][src]

pub struct BoxFileReader { /* fields omitted */ }

Implementations

impl BoxFileReader[src]

pub fn open_at_offset<P: AsRef<Path>>(
    path: P,
    offset: u64
) -> Result<BoxFileReader>
[src]

This will open an existing .box file for reading and writing, and error if the file is not valid.

pub fn open<P: AsRef<Path>>(path: P) -> Result<BoxFileReader>[src]

This will open an existing .box file for reading and writing, and error if the file is not valid.

pub fn path(&self) -> &Path[src]

pub fn alignment(&self) -> u64[src]

pub fn version(&self) -> u32[src]

pub fn metadata(&self) -> &BoxMetadata[src]

pub fn decompress_value<V: Decompress>(&self, record: &FileRecord) -> Result<V>[src]

pub fn decompress<W: Write>(&self, record: &FileRecord, dest: W) -> Result<()>[src]

pub fn extract<P: AsRef<Path>>(
    &self,
    path: &BoxPath,
    output_path: P
) -> Result<()>
[src]

pub fn extract_all<P: AsRef<Path>>(&self, output_path: P) -> Result<()>[src]

pub fn read_bytes(&self, record: &FileRecord) -> Result<Take<File>>[src]

pub unsafe fn memory_map(&self, record: &FileRecord) -> Result<Mmap>[src]

Safety

Use of memory maps is unsafe as modifications to the file could affect the operation of the application. Ensure that the Box being operated on is not mutated while a memory map is in use.

Trait Implementations

impl Debug for BoxFileReader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.