[−][src]Struct debpkg::DebPkg
A debian package represented by the control data the archive holding all the information
Methods
impl<'a, R: 'a + Read> DebPkg<R>
[src]
pub fn parse(reader: R) -> Result<DebPkg<R>, Error>
[src]
Parses a debian package out of reader
Arguments
reader
- A type which implementsstd::io::Read
andstd::io::Seek
and is formatted as an ar archive
Example
use debpkg::DebPkg; let file = std::fs::File::open("test.deb").unwrap(); let pkg = DebPkg::parse(file).unwrap();
pub fn format_version(&self) -> (u32, u32)
[src]
Returns the format version of the binary debian package
pub fn control(&'a mut self) -> Result<Archive<Box<dyn Read + 'a>>, Error>
[src]
Returns the control tar
Arguments
self
- ADebPkg
created by a call toDebPkg::parse
Example
use debpkg::DebPkg; let file = std::fs::File::open("test.deb").unwrap(); let mut pkg = DebPkg::parse(file).unwrap(); let mut control_tar = pkg.control().unwrap(); for file in control_tar.entries().unwrap() { println!("{}", file.unwrap().path().unwrap().display()); }
pub fn data(&'a mut self) -> Result<Archive<Box<dyn Read + 'a>>, Error>
[src]
Returns the data tar
Must only be called
Arguments
self
- ADebPkg
created by a call toDebPkg::parse
Example
use debpkg::DebPkg; let file = std::fs::File::open("test.deb").unwrap(); let mut pkg = DebPkg::parse(file).unwrap(); let mut data_tar = pkg.data().unwrap(); for file in data_tar.entries().unwrap() { println!("{}", file.unwrap().path().unwrap().display()); }
Auto Trait Implementations
impl<R> RefUnwindSafe for DebPkg<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for DebPkg<R> where
R: Send,
R: Send,
impl<R> Sync for DebPkg<R> where
R: Sync,
R: Sync,
impl<R> Unpin for DebPkg<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for DebPkg<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,