pub enum Step {
Missing {
id: StepId,
releases: Vec<(PackName, Release)>,
refused: BTreeMap<PackName, String>,
},
KeptVersions {
id: StepId,
registry: String,
pack: PackName,
},
Versions {
id: StepId,
registry: String,
pack: PackName,
},
KeepVersions {
id: StepId,
registry: String,
pack: PackName,
versions: Vec<VersionInfo>,
max_age: u64,
},
Kept {
id: StepId,
release: KeptRelease,
},
Tarball {
id: StepId,
registry: String,
version: VersionInfo,
max_bytes: u64,
},
Keep {
id: StepId,
release: KeptRelease,
files: Files,
},
}Expand description
What the resolution needs the host to do.
Variants§
Missing
Add releases to the request’s packs and refused to its policy’s, then ask the processor which packs the
request still imports that it has no release of (sources): Answer::Missing.
Fields
KeptVersions
Read the cache’s list of pack’s versions at registry: Answer::KeptVersions.
Versions
Ask the registry at registry for pack’s versions: Answer::Versions, none when it doesn’t have the pack,
or Answer::Failed. A registry that speaks npm’s protocol GETs super::metadata_url and reads the answer
with super::answered_versions; a host’s own registry gives its versions as it has them.
KeepVersions
Keep pack’s versions at registry in the cache, for max_age seconds: Answer::Done.
Fields
versions: Vec<VersionInfo>The versions.
Kept
Read the cache’s files of release: Answer::Kept.
Tarball
Get version’s tarball from the registry at registry, its bytes as they come, stopping past max_bytes:
Answer::Tarball, or Answer::Failed. A registry that speaks npm’s protocol fetches it from its own origin
only (super::off_origin); the resolution checks the bytes, whoever gives them.
Fields
version: VersionInfoThe version, with where its tarball is.
Keep
Keep release’s checked files in the cache: Answer::Done.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Step
impl<'de> Deserialize<'de> for Step
Source§fn 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>,
impl Eq for Step
impl StructuralPartialEq for Step
Auto Trait Implementations§
impl Forget for Step
impl Freeze for Stepwhere
*const u8 is !null: Freeze,
PhantomData<(PackName, Release)>: Freeze,
*const LeafNode<PackName, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(PackName, String)>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<VersionInfo>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
*const LeafNode<String, Vec<u8>> is !null: Freeze,
PhantomData<Box<(String, Vec<u8>)>>: Freeze,
impl Move for Step
impl RefUnwindSafe for Step
impl Send for Stepwhere
RawVecInner: Send,
Identifier: Send,
NodeRef<Owned, String, String, LeafOrInternal>: Send,
BoxRaw<(String, String)>: Send,
NodeRef<Owned, PackName, String, LeafOrInternal>: Send,
BoxRaw<(PackName, String)>: Send,
NodeRef<Owned, String, Vec<u8>, LeafOrInternal>: Send,
BoxRaw<(String, Vec<u8>)>: Send,
impl Sync for Stepwhere
RawVecInner: Sync,
Identifier: Sync,
NodeRef<Owned, String, String, LeafOrInternal>: Sync,
BoxRaw<(String, String)>: Sync,
NodeRef<Owned, PackName, String, LeafOrInternal>: Sync,
BoxRaw<(PackName, String)>: Sync,
NodeRef<Owned, String, Vec<u8>, LeafOrInternal>: Sync,
BoxRaw<(String, Vec<u8>)>: Sync,
impl Unpin for Step
impl UnsafeUnpin for Stepwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(PackName, Release)>: UnsafeUnpin,
*const LeafNode<PackName, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(PackName, String)>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<VersionInfo>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
*const LeafNode<String, Vec<u8>> is !null: UnsafeUnpin,
PhantomData<Box<(String, Vec<u8>)>>: UnsafeUnpin,
impl UnwindSafe for Stepwhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BTreeMap<PackName, String>: UnwindSafe,
BTreeMap<String, Vec<u8>>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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