[][src]Struct pkgutils::Database

pub struct Database { /* fields omitted */ }

The Database contains a list of all packages that are available for install, as well as a list of all the packages installed on the system. It is used to calculate the dependencies of a package and for checking if a package is installed.

Implementations

impl Database[src]

The Database contains a list of all packages that are available for install, as well as a list of all the packages installed on the system. It is used to calculate the dependencies of a package and for checking if a package is installed.

pub fn open<P: AsRef<Path>>(
    installed_path: P,
    pkgdepends: PackageDepends
) -> Self
[src]

Opens a database from the specified path.

pub fn is_pkg_installed(&self, pkg_name: &str) -> bool[src]

Checks if a package is installed

pub fn get_pkg_depends(
    &self,
    pkg_name: &str
) -> Result<Vec<String>, DatabaseError>
[src]

Retrieves the dependencies of a package that are listed in its manifest file.

pub fn calculate_depends(
    &self,
    pkg_name: &str,
    ordered_dependencies: &mut OrderMap<String, ()>
) -> Result<(), DatabaseError>
[src]

Calculates the dependencies of the specified package, and appends them to ordered_dependencies.

Trait Implementations

impl Debug for Database[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any