#[non_exhaustive]pub struct Archive {
pub sfx_offset: usize,
pub main: MainHeader,
pub blocks: Vec<Block>,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sfx_offset: usize§main: MainHeader§blocks: Vec<Block>Implementations§
Source§impl Archive
impl Archive
pub fn extract_to<F>( &self, options: ArchiveReadOptions<'_>, open: F, ) -> Result<()>
Source§impl Archive
impl Archive
pub fn parse(input: &[u8]) -> Result<Self>
pub fn parse_owned(input: Vec<u8>) -> Result<Self>
pub fn parse_with_options( input: &[u8], options: ArchiveReadOptions<'_>, ) -> Result<Self>
pub fn parse_owned_with_options( input: Vec<u8>, options: ArchiveReadOptions<'_>, ) -> Result<Self>
pub fn parse_with_password( input: &[u8], password: Option<&[u8]>, ) -> Result<Self>
pub fn parse_owned_with_password( input: Vec<u8>, password: Option<&[u8]>, ) -> Result<Self>
pub fn parse_path(path: impl AsRef<Path>) -> Result<Self>
pub fn parse_path_with_options( path: impl AsRef<Path>, options: ArchiveReadOptions<'_>, ) -> Result<Self>
pub fn parse_path_with_password( path: impl AsRef<Path>, password: Option<&[u8]>, ) -> Result<Self>
pub fn parse_path_with_signature( path: impl AsRef<Path>, signature: ArchiveSignature, options: ArchiveReadOptions<'_>, ) -> Result<Self>
pub fn parse_path_with_signature_and_password( path: impl AsRef<Path>, signature: ArchiveSignature, password: Option<&[u8]>, ) -> Result<Self>
pub fn files(&self) -> impl Iterator<Item = &FileHeader>
pub fn services(&self) -> impl Iterator<Item = &FileHeader>
Sourcepub fn archive_comment(&self) -> Result<Option<Vec<u8>>>
pub fn archive_comment(&self) -> Result<Option<Vec<u8>>>
Decodes the archive-level CMT service payload, if any.
RAR 5 stores comments as Service blocks named CMT. Archive-level
comments appear before any File block; service blocks attached to a
specific file follow that file. This returns only the former.
Sourcepub fn archive_comment_with_password(
&self,
password: Option<&[u8]>,
) -> Result<Option<Vec<u8>>>
pub fn archive_comment_with_password( &self, password: Option<&[u8]>, ) -> Result<Option<Vec<u8>>>
Same as Self::archive_comment but supplies a password for
individually-encrypted comment services.
pub fn repair_recovery(&self) -> Result<Vec<u8>>
pub fn repair_recovery_to(&self, writer: &mut dyn Write) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Archive
impl RefUnwindSafe for Archive
impl Send for Archive
impl Sync for Archive
impl Unpin for Archive
impl UnsafeUnpin for Archive
impl UnwindSafe for Archive
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more