Struct node_maintainer::Nassun
source · pub struct Nassun { /* private fields */ }Expand description
Toplevel client for making package requests.
Implementations§
source§impl Nassun
impl Nassun
sourcepub fn new() -> Nassun
pub fn new() -> Nassun
Creates a new Nassun instance with default settings. To configure
Nassun, use NassunOpts.
sourcepub async fn corgi_packument(
spec: impl AsRef<str>
) -> Result<Arc<CorgiPackument>, NassunError>
pub async fn corgi_packument( spec: impl AsRef<str> ) -> Result<Arc<CorgiPackument>, NassunError>
sourcepub async fn metadata(
spec: impl AsRef<str>
) -> Result<VersionMetadata, NassunError>
pub async fn metadata( spec: impl AsRef<str> ) -> Result<VersionMetadata, NassunError>
Resolves a VersionMetadata from the given package spec, using
the default resolution algorithm.
This uses default Nassun settings and does not cache the result.
To configure Nassun, and/or enable more efficient caching/reuse,
look at [Package::metadata instead].
sourcepub async fn corgi_metadata(
spec: impl AsRef<str>
) -> Result<CorgiVersionMetadata, NassunError>
pub async fn corgi_metadata( spec: impl AsRef<str> ) -> Result<CorgiVersionMetadata, NassunError>
Resolves a partial (corgi) version of the VersionMetadata from the
given package spec, using the default resolution algorithm.
This uses default Nassun settings and does not cache the result.
To configure Nassun, and/or enable more efficient caching/reuse,
look at [Package::metadata instead].
sourcepub async fn tarball(spec: impl AsRef<str>) -> Result<Tarball, NassunError>
pub async fn tarball(spec: impl AsRef<str>) -> Result<Tarball, NassunError>
Resolves a Tarball from the given package spec, using the
default resolution algorithm. This tarball will have its data checked
if the package metadata fetched includes integrity information.
This uses default Nassun settings and does not cache the result.
To configure Nassun, and/or enable more efficient caching/reuse,
look at Package::tarball instead.
sourcepub async fn entries(spec: impl AsRef<str>) -> Result<Entries, NassunError>
pub async fn entries(spec: impl AsRef<str>) -> Result<Entries, NassunError>
Resolves Entries from the given package spec, using the
default resolution algorithm. The source tarball will have its data
checked if the package metadata fetched includes integrity
information.
This uses default Nassun settings and does not cache the result.
To configure Nassun, and/or enable more efficient caching/reuse,
look at Package::entries instead.
sourcepub async fn resolve(
&self,
spec: impl AsRef<str>
) -> Result<Package, NassunError>
pub async fn resolve( &self, spec: impl AsRef<str> ) -> Result<Package, NassunError>
Resolve a string spec (e.g. foo@^1.2.3, github:foo/bar, etc), to a
Package that can be used for further operations.
sourcepub async fn resolve_spec(
&self,
spec: PackageSpec
) -> Result<Package, NassunError>
pub async fn resolve_spec( &self, spec: PackageSpec ) -> Result<Package, NassunError>
Resolve a spec (e.g. foo@^1.2.3, github:foo/bar, etc), to a
Package that can be used for further operations.
sourcepub fn resolve_from(
&self,
name: String,
from: PackageSpec,
resolved: PackageResolution
) -> Package
pub fn resolve_from( &self, name: String, from: PackageSpec, resolved: PackageResolution ) -> Package
Resolves a package directly from a previously-calculated
PackageResolution. This is meant to be a lower-level call that
expects the caller to have already done any necessary parsing work on
its arguments.
sourcepub fn dummy_from_manifest(manifest: CorgiManifest) -> Package
pub fn dummy_from_manifest(manifest: CorgiManifest) -> Package
Creates a “resolved” package from a plain oro_common::Manifest.
This is useful for, say, creating dummy packages for top-level
projects.