pub struct Bundle { /* private fields */ }Expand description
An in-memory bundle extracted from a ZIP archive.
Implementations§
Source§impl Bundle
impl Bundle
Sourcepub fn from_zip_bytes(bytes: impl AsRef<[u8]>) -> Result<Self>
pub fn from_zip_bytes(bytes: impl AsRef<[u8]>) -> Result<Self>
Constructs a bundle from a ZIP archive held entirely in memory.
Cloning the resulting Bundle is inexpensive; the file data is reference
counted internally so you can parse once and reuse it across invocations.
Sourcepub fn from_reader<R: Read + Seek>(reader: R) -> Result<Self>
pub fn from_reader<R: Read + Seek>(reader: R) -> Result<Self>
Constructs a bundle from any Read + Seek ZIP archive.
Sourcepub fn entries(&self) -> &[BundleEntry]
pub fn entries(&self) -> &[BundleEntry]
Returns all entries in this bundle.
Sourcepub fn fingerprint(&self) -> BundleFingerprint
pub fn fingerprint(&self) -> BundleFingerprint
Returns a stable fingerprint for the bundle contents.
Sourcepub fn manifest(&self) -> Result<Option<BundleManifest>>
pub fn manifest(&self) -> Result<Option<BundleManifest>>
Parses and returns the embedded bundle manifest, if present.
Sourcepub fn into_entries(self) -> Vec<BundleEntry>
pub fn into_entries(self) -> Vec<BundleEntry>
Consumes the bundle and returns its entries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bundle
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnwindSafe for Bundle
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