pub struct ComponentPackageReader { /* private fields */ }
Expand description
Read-only interface for a single component package.
Implementations§
Source§impl ComponentPackageReader
impl ComponentPackageReader
Sourcepub fn from_file_data(
bom: Option<Vec<u8>>,
package_info: Option<Vec<u8>>,
payload: Option<Vec<u8>>,
scripts: Option<Vec<u8>>,
) -> PkgResult<Self>
pub fn from_file_data( bom: Option<Vec<u8>>, package_info: Option<Vec<u8>>, payload: Option<Vec<u8>>, scripts: Option<Vec<u8>>, ) -> PkgResult<Self>
Construct an instance with raw file data backing different files.
Sourcepub fn package_info(&self) -> Option<&PackageInfo>
pub fn package_info(&self) -> Option<&PackageInfo>
Obtain the parsed PackageInfo
XML file.
Sourcepub fn payload_reader(&self) -> PkgResult<Option<CpioReader>>
pub fn payload_reader(&self) -> PkgResult<Option<CpioReader>>
Obtain a reader for the Payload
cpio archive.
Sourcepub fn scripts_reader(&self) -> PkgResult<Option<CpioReader>>
pub fn scripts_reader(&self) -> PkgResult<Option<CpioReader>>
Obtain a reader for the Scripts
cpio archive.
Auto Trait Implementations§
impl Freeze for ComponentPackageReader
impl RefUnwindSafe for ComponentPackageReader
impl Send for ComponentPackageReader
impl Sync for ComponentPackageReader
impl Unpin for ComponentPackageReader
impl UnwindSafe for ComponentPackageReader
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