#[non_exhaustive]pub struct SearchResult {
pub name: String,
pub version: String,
pub description: Option<String>,
pub keywords: Vec<String>,
pub date: Option<String>,
pub homepage: Option<String>,
}Expand description
A single npm registry search result (from the /-/v1/search endpoint): the package name, its
latest published version, and the descriptive metadata the registry indexes.
#[non_exhaustive] like Resolved — constructed only inside the crate, read by callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§version: StringThe latest published version the registry indexes for this package.
description: Option<String>The package’s description, when it publishes one.
keywords: Vec<String>The package’s keywords (empty when none are published).
date: Option<String>Publication date of this version (RFC 3339), when the registry reports it.
homepage: Option<String>The package homepage (links.homepage), when published.
Trait Implementations§
Source§impl Clone for SearchResult
impl Clone for SearchResult
Source§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
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 moreAuto Trait Implementations§
impl Freeze for SearchResult
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnsafeUnpin for SearchResult
impl UnwindSafe for SearchResult
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