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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Nassun
impl !RefUnwindSafe for Nassun
impl Send for Nassun
impl Sync for Nassun
impl Unpin for Nassun
impl !UnwindSafe for Nassun
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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