pub struct Packages { /* private fields */ }
Implementations
sourceimpl Packages
impl Packages
pub fn new() -> Self
pub fn contains_drv(&self, drv: &Derivation) -> Option<PackageId>
pub fn contains(&self, id: &PackageId) -> bool
pub fn insert(
&mut self,
id: PackageId,
drv: Derivation,
objects: HashSet<ObjectId>
) -> Option<Derivation>
pub fn insert_child(&mut self, id: &PackageId, child: ObjectId) -> Option<bool>
pub fn get(&self, id: &PackageId) -> Option<&Derivation>
pub unsafe fn get_unchecked(&self, id: &PackageId) -> &Derivation
pub fn get_children(&self, id: &PackageId) -> Option<&HashSet<ObjectId>>
pub fn get_full(
&self,
id: &PackageId
) -> Option<(&Derivation, &HashSet<ObjectId>)>
pub fn remove(
&mut self,
id: &PackageId
) -> Option<(Derivation, HashSet<ObjectId>)>
pub fn path_in_store<P: AsRef<Path>>(
&self,
id: &PackageId,
store_path: P
) -> Option<PathBuf>
pub fn url_in_store(&self, id: &PackageId, store_url: &Url) -> Option<Url>
pub fn filter<P>(
&self,
predicate: P
) -> impl Iterator<Item = (&PackageId, &Derivation, &HashSet<ObjectId>)> where
P: Fn(&PackageId, &Derivation, &HashSet<ObjectId>) -> bool,
pub fn filter_by_name_starting_with<'a>(
&'a self,
name: &'a str
) -> impl Iterator<Item = (&PackageId, &Derivation, &HashSet<ObjectId>)> + '_
pub fn filter_by_name_containing<'a>(
&'a self,
name: &'a str
) -> impl Iterator<Item = (&PackageId, &Derivation, &HashSet<ObjectId>)> + '_
pub fn find<P: Fn(&PackageId, &Derivation, &HashSet<ObjectId>) -> bool>(
&self,
predicate: P
) -> Option<(&PackageId, &Derivation)>
pub fn find_by_name_starting_with(
&self,
name: &str
) -> Option<(&PackageId, &Derivation)>
pub fn find_by_name_containing(
&self,
name: &str
) -> Option<(&PackageId, &Derivation)>
pub fn find_by_name(&self, name: &str) -> Option<(&PackageId, &Derivation)>
pub fn find_package_id(&self, object_id: &ObjectId) -> Option<&PackageId>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Packages
impl<'de> Deserialize<'de> for Packages
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Packages
impl Send for Packages
impl Sync for Packages
impl Unpin for Packages
impl UnwindSafe for Packages
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more