pub struct PackageContents { /* private fields */ }
Expand description
Container for the contents of a package that have been downloaded.
Implementations§
Source§impl PackageContents
impl PackageContents
pub fn pack_from_path(input: &Path) -> Result<Self>
Sourcepub fn unpack_into_path(&self, output: &Path) -> Result<()>
pub fn unpack_into_path(&self, output: &Path) -> Result<()>
Unpack the package into the given path on the filesystem.
pub fn filtered_contents(input: &Path) -> Result<Vec<PathBuf>>
pub fn data(&self) -> &[u8] ⓘ
Sourcepub fn from_buffer(data: Vec<u8>) -> PackageContents
pub fn from_buffer(data: Vec<u8>) -> PackageContents
Create a new PackageContents object from a buffer.
Trait Implementations§
Source§impl Clone for PackageContents
impl Clone for PackageContents
Source§fn clone(&self) -> PackageContents
fn clone(&self) -> PackageContents
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PackageContents
impl RefUnwindSafe for PackageContents
impl Send for PackageContents
impl Sync for PackageContents
impl Unpin for PackageContents
impl UnwindSafe for PackageContents
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