[−][src]Struct deb_rs::file::Deb
This is the struct that should be used to parse .deb
files.
It should first be created with Deb::new and then extracted with Deb::extract. Once
the file has been extracted you can then retrieve data from it.
Example
use std::io::Error; use deb_rs::file::Deb; fn main() -> Result<(), Error> { let mut deb = Deb::new("./example/assets/gnome_clocks.deb"); deb.extract()?; deb.version()?; // Returns the version of the structure of the debian package. // NOTE: extract() will fail with versions that are not 2.0 as their structure is different deb.retrieve_control()?; // Will return some general information about the contents of the package deb.install_tree()?; // Returns an array of files that must be moved for the file package to work Ok(()) }
Fields
extracted_path: Option<String>
Implementations
impl Deb
[src]
@todo Add support for prerm and postinst files
pub fn new(path: &'static str) -> Self
[src]
pub fn extract(&mut self) -> Result<&mut Self, Error>
[src]
Extracts the deb file into a set of individual files
pub fn version(&self) -> Result<Version, Error>
[src]
Returns the version of the deb file. Note that the standard has been V2_0 (2.0
) since debian 0.93
pub fn install_tree(&self) -> Result<Vec<PathItem>, Error>
[src]
@todo Docs for this function
pub fn retrieve_control(&self) -> Result<Control, Error>
[src]
@todo Docs for this function
Trait Implementations
impl Clone for Deb
[src]
impl Debug for Deb
[src]
impl Eq for Deb
[src]
impl PartialEq<Deb> for Deb
[src]
impl StructuralEq for Deb
[src]
impl StructuralPartialEq for Deb
[src]
Auto Trait Implementations
impl RefUnwindSafe for Deb
impl Send for Deb
impl Sync for Deb
impl Unpin for Deb
impl UnwindSafe for Deb
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,