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]
path: P,
offset: u64
) -> Result<BoxFileReader>
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]
&self,
path: &BoxPath,
output_path: P
) -> Result<()>
pub fn extract_all<P: AsRef<Path>>(&self, output_path: P) -> Result<()>
[src]
pub fn resolve_link(&self, link: &LinkRecord) -> Result<RecordsItem<'_>>
[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
Auto Trait Implementations
impl RefUnwindSafe for BoxFileReader
impl Send for BoxFileReader
impl Sync for BoxFileReader
impl Unpin for BoxFileReader
impl UnwindSafe for BoxFileReader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,