pub struct Alpm {
pub local_db: Db,
pub sync_dbs: Vec<Db>,
}Expand description
Little helper struct that logically groups a system’s databases together, and makes construction and passing around a reference easier.
Fields§
§local_db: Db§sync_dbs: Vec<Db>Implementations§
Source§impl Alpm
impl Alpm
Sourcepub fn new(location: impl AsRef<Path> + Sync) -> Result<Alpm, Error>
pub fn new(location: impl AsRef<Path> + Sync) -> Result<Alpm, Error>
Create an Alpm instance using multiple threads (WIP: Threading is hard)
Sourcepub fn foreign_pkgs<'a>(&'a self) -> impl Iterator<Item = &'a MetaPackage>
pub fn foreign_pkgs<'a>(&'a self) -> impl Iterator<Item = &'a MetaPackage>
Easy iterator over all packages on the system that are installed and are not found in the local database.
Auto Trait Implementations§
impl Freeze for Alpm
impl RefUnwindSafe for Alpm
impl Send for Alpm
impl Sync for Alpm
impl Unpin for Alpm
impl UnwindSafe for Alpm
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more