pub struct JsrVersion {
pub version: ConcreteVersion,
pub yanked: bool,
pub published_at: Option<PublishTime>,
}Expand description
A JSR package version, from https://jsr.io/@{scope}/{pkg}/meta.json.
published_at is populated directly from the same response get_versions already
fetches (meta.json’s per-version createdAt) — unlike npm, no extra request is
needed for freshness data (D10).
§Examples
use deps_deno::types::JsrVersion;
let version = JsrVersion {
version: "1.0.24".into(),
yanked: false,
published_at: None,
};
assert!(!version.yanked);Fields§
§version: ConcreteVersionThe version string (e.g. "1.0.24").
yanked: boolWhether JSR marked this specific version as yanked.
published_at: Option<PublishTime>When this version was published, parsed from meta.json’s createdAt.
Trait Implementations§
Source§impl Clone for JsrVersion
impl Clone for JsrVersion
Source§fn clone(&self) -> JsrVersion
fn clone(&self) -> JsrVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsrVersion
impl Debug for JsrVersion
Source§impl Version for JsrVersion
impl Version for JsrVersion
Source§fn version_string(&self) -> &ConcreteVersion
fn version_string(&self) -> &ConcreteVersion
Version string (e.g., “1.0.214”, “14.21.3”).
Source§fn removal_status(&self) -> RemovalStatus
fn removal_status(&self) -> RemovalStatus
This version’s removal/deprecation status as reported by the registry. Read more
Source§fn published_at(&self) -> Option<PublishTime>
fn published_at(&self) -> Option<PublishTime>
When this version was published, if the registry exposes it. Read more
Source§fn is_prerelease(&self) -> bool
fn is_prerelease(&self) -> bool
Whether this version is a pre-release (alpha, beta, rc, etc.). Read more
Source§fn deprecation(&self) -> Option<&Deprecation>
fn deprecation(&self) -> Option<&Deprecation>
Package-level deprecation payload, when this version’s registry data carries one. Read more
Auto Trait Implementations§
impl Freeze for JsrVersion
impl RefUnwindSafe for JsrVersion
impl Send for JsrVersion
impl Sync for JsrVersion
impl Unpin for JsrVersion
impl UnsafeUnpin for JsrVersion
impl UnwindSafe for JsrVersion
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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