pub struct Database { /* private fields */ }Expand description
Every installed package, with indexes by provided name and by file.
Implementations§
Source§impl Database
impl Database
Sourcepub fn closure(&self, root: &str, optional: &[String]) -> Closure
pub fn closure(&self, root: &str, optional: &[String]) -> Closure
The transitive depends closure of root and of every package
named in optional, plus every optional dependency so named,
resolved through provides. Naming a package nothing depends on,
a Vulkan driver say, is how it enters at all.
Sourcepub fn closure_excluding(
&self,
root: &str,
optional: &[String],
excluded: &BTreeSet<String>,
) -> Closure
pub fn closure_excluding( &self, root: &str, optional: &[String], excluded: &BTreeSet<String>, ) -> Closure
As Self::closure, with excluded packages treated as absent:
neither they nor what only they depend on enter.
Source§impl Database
impl Database
Sourcepub fn insert(&mut self, package: Package)
pub fn insert(&mut self, package: Package)
Add a package, indexing what it provides and owns. Later packages never displace an earlier owner of the same file.
pub fn package(&self, name: &str) -> Option<&Package>
pub fn packages(&self) -> impl Iterator<Item = &Package>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
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