Skip to main content

PackageSet

Trait PackageSet 

Source
pub trait PackageSet: Send + Sync {
    // Required methods
    fn get(&self, name: &str) -> Result<PackageLookup, PackageSetError>;
    fn names(&self) -> Vec<String>;

    // Provided method
    fn label(&self) -> &str { ... }
}
Expand description

A queryable set of packages. Implementations include:

  • NixpkgsBridge — resolves names to nixpkgs attributes on disk
  • LispPackageSet — tatara-lisp-authored derivations (future)
  • OverlayPackageSet — one set composed over another

Required Methods§

Source

fn get(&self, name: &str) -> Result<PackageLookup, PackageSetError>

Retrieve the derivation for a named package. None if not present.

Source

fn names(&self) -> Vec<String>

Short list of package names this set knows about. May be a finite enumeration (LispPackageSet) or a caller-provided seed (NixpkgsBridge doesn’t enumerate nixpkgs by default — too large).

Provided Methods§

Source

fn label(&self) -> &str

Optional provenance label for logging / error messages.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§