pub struct PackageArchive { /* private fields */ }
Expand description
Represents an extracted Rust package archive.
File contents exist in memory.
Implementations§
Source§impl PackageArchive
impl PackageArchive
Sourcepub fn new(format: CompressionFormat, data: Vec<u8>) -> Result<Self>
pub fn new(format: CompressionFormat, data: Vec<u8>) -> Result<Self>
Construct a new instance with compressed tar data.
Sourcepub fn resolve_installs(&self) -> Result<Vec<(PathBuf, &FileEntry)>>
pub fn resolve_installs(&self) -> Result<Vec<(PathBuf, &FileEntry)>>
Resolve file installs that need to be performed to materialize this package.
Returned Vec has relative destination path and the FileManifest’s internal entry as members.
Sourcepub fn write_installs_manifest(&self, fh: &mut impl Write) -> Result<()>
pub fn write_installs_manifest(&self, fh: &mut impl Write) -> Result<()>
Write a file containing SHA-256 hashes of file installs to the specified writer.
Auto Trait Implementations§
impl Freeze for PackageArchive
impl RefUnwindSafe for PackageArchive
impl Send for PackageArchive
impl Sync for PackageArchive
impl Unpin for PackageArchive
impl UnwindSafe for PackageArchive
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