pub struct OpenedArchive {
pub volume_header: VolumeHeader,
pub crypto_header: CryptoHeaderFixed,
pub manifest_footer: ManifestFooter,
pub volume_trailer: Option<VolumeTrailer>,
pub root_auth_footer: Option<RootAuthFooterV1>,
pub index_root: IndexRoot,
/* private fields */
}Fields§
§volume_header: VolumeHeader§crypto_header: CryptoHeaderFixed§volume_trailer: Option<VolumeTrailer>§index_root: IndexRootImplementations§
Source§impl OpenedArchive
impl OpenedArchive
pub fn open_with_options( bytes: &[u8], master_key: &MasterKey, options: ReaderOptions, ) -> Result<Self, FormatError>
pub fn open_volumes_with_options( volumes: &[&[u8]], master_key: &MasterKey, options: ReaderOptions, ) -> Result<Self, FormatError>
pub fn open_with_bootstrap_sidecar_options( bytes: &[u8], bootstrap_sidecar: &[u8], master_key: &MasterKey, options: ReaderOptions, ) -> Result<Self, FormatError>
pub fn list_files(&self) -> Result<Vec<ArchiveEntry>, FormatError>
Sourcepub fn extract_file(&self, path: &str) -> Result<Option<Vec<u8>>, FormatError>
pub fn extract_file(&self, path: &str) -> Result<Option<Vec<u8>>, FormatError>
Return only the regular-file payload bytes for path.
This is a payload-only convenience for callers that do not need tar
metadata fidelity diagnostics. Use Self::extract_file_with_diagnostics
or Self::extract_member when unsupported local PAX/GNU metadata must
be reported to users.
Sourcepub fn extract_file_with_diagnostics(
&self,
path: &str,
) -> Result<Option<(Vec<u8>, Vec<MetadataDiagnostic>)>, FormatError>
pub fn extract_file_with_diagnostics( &self, path: &str, ) -> Result<Option<(Vec<u8>, Vec<MetadataDiagnostic>)>, FormatError>
Return regular-file payload bytes together with parsed tar metadata
diagnostics for path.
pub fn extract_member( &self, path: &str, ) -> Result<Option<ExtractedArchiveMember>, FormatError>
pub fn extract_file_to( &self, path: &str, root: &Path, options: SafeExtractionOptions, ) -> Result<Option<Vec<MetadataDiagnostic>>, FormatError>
pub fn verify(&self) -> Result<(), FormatError>
pub fn verify_root_auth_with<F>( &self, verifier: F, ) -> Result<RootAuthVerification, FormatError>
Trait Implementations§
Source§impl Clone for OpenedArchive
impl Clone for OpenedArchive
Source§fn clone(&self) -> OpenedArchive
fn clone(&self) -> OpenedArchive
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OpenedArchive
impl RefUnwindSafe for OpenedArchive
impl Send for OpenedArchive
impl Sync for OpenedArchive
impl Unpin for OpenedArchive
impl UnsafeUnpin for OpenedArchive
impl UnwindSafe for OpenedArchive
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