pub struct PackageVersion(/* private fields */);Expand description
A canonical SemVer package identity without build metadata.
Prerelease identifiers are preserved because npm packages may depend on an exact prerelease. Build metadata is rejected because it does not participate in SemVer precedence and would make registry identities ambiguous.
Implementations§
Trait Implementations§
Source§impl Clone for PackageVersion
impl Clone for PackageVersion
Source§fn clone(&self) -> PackageVersion
fn clone(&self) -> PackageVersion
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 PackageVersion
impl Debug for PackageVersion
Source§impl Display for PackageVersion
impl Display for PackageVersion
impl Eq for PackageVersion
Source§impl FromStr for PackageVersion
impl FromStr for PackageVersion
Source§impl Hash for PackageVersion
impl Hash for PackageVersion
Source§impl Ord for PackageVersion
impl Ord for PackageVersion
Source§fn cmp(&self, other: &PackageVersion) -> Ordering
fn cmp(&self, other: &PackageVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PackageVersion
impl PartialEq for PackageVersion
Source§impl PartialOrd for PackageVersion
impl PartialOrd for PackageVersion
impl StructuralPartialEq for PackageVersion
Auto Trait Implementations§
impl Freeze for PackageVersion
impl RefUnwindSafe for PackageVersion
impl Send for PackageVersion
impl Sync for PackageVersion
impl Unpin for PackageVersion
impl UnsafeUnpin for PackageVersion
impl UnwindSafe for PackageVersion
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