#[non_exhaustive]pub struct Resolved {
pub name: String,
pub version: Version,
pub tarball_url: String,
pub integrity: Option<String>,
pub license: Option<String>,
}Expand description
A resolved package version: the exact version, the tarball to fetch, and the
registry’s dist.integrity SRI for that tarball (when the packument publishes one).
#[non_exhaustive] so further fields can be added without a breaking change — this
type is only ever constructed inside the crate; callers receive and read it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§version: Version§tarball_url: String§integrity: Option<String>The registry’s Subresource-Integrity hash (sha512-<base64>), when the packument
carries one — verified against the downloaded bytes before extraction. None for a
synthesized tarball URL or a packument entry without dist.integrity.
license: Option<String>The version’s declared license, normalized to a single SPDX-ish string from the
packument’s license string / legacy { "type": … } object / licenses[] array.
None when the packument declares none. Carried so a generated lockfile can record
it for license/compliance tooling (npm’s own lockfiles do the same).