pub struct JsrPackage {
pub name: PackageName,
pub description: Option<String>,
pub repository: Option<String>,
pub documentation: Option<String>,
pub latest_version: ConcreteVersion,
}Expand description
A JSR package search result, from https://api.jsr.io/packages?query=.
name is already scheme-qualified ("jsr:@scope/pkg", per D3) so a completion item
built from it inserts a valid Deno specifier rather than a bare JSR package name.
§Examples
use deps_deno::types::JsrPackage;
let pkg = JsrPackage {
name: "jsr:@std/fs".into(),
description: Some("File system utilities".into()),
repository: Some("https://github.com/denoland/std".into()),
documentation: None,
latest_version: "1.0.24".into(),
};
assert_eq!(pkg.name, "jsr:@std/fs");Fields§
§name: PackageNameScheme-qualified package name ("jsr:@scope/pkg").
description: Option<String>Package description, if JSR returned a non-empty one.
repository: Option<String>Repository URL, derived from the search response’s githubRepository field.
documentation: Option<String>Documentation URL. Always None today: JSR’s search response carries no separate
documentation link distinct from the package’s own JSR page (package_url).
latest_version: ConcreteVersionLatest published version string.
Trait Implementations§
Source§impl Clone for JsrPackage
impl Clone for JsrPackage
Source§fn clone(&self) -> JsrPackage
fn clone(&self) -> JsrPackage
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 JsrPackage
impl Debug for JsrPackage
Source§impl Metadata for JsrPackage
impl Metadata for JsrPackage
Source§fn name(&self) -> &PackageName
fn name(&self) -> &PackageName
The package name as the registry reports it. Read more
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Short description (optional).
Source§fn repository(&self) -> Option<&str>
fn repository(&self) -> Option<&str>
Repository URL (optional).
Source§fn documentation(&self) -> Option<&str>
fn documentation(&self) -> Option<&str>
Documentation URL (optional).
Source§fn latest_version(&self) -> &ConcreteVersion
fn latest_version(&self) -> &ConcreteVersion
Latest stable version.
Auto Trait Implementations§
impl Freeze for JsrPackage
impl RefUnwindSafe for JsrPackage
impl Send for JsrPackage
impl Sync for JsrPackage
impl Unpin for JsrPackage
impl UnsafeUnpin for JsrPackage
impl UnwindSafe for JsrPackage
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