pub struct CrateVersion(pub Version);Expand description
A semver crate version (no shape constraints beyond what semver requires).
We delegate validation to the semver crate but still expose this newtype
so call sites can switch wire types without hopping back into raw strings.
Tuple Fields§
§0: VersionImplementations§
Trait Implementations§
Source§impl Clone for CrateVersion
impl Clone for CrateVersion
Source§impl Debug for CrateVersion
impl Debug for CrateVersion
Source§impl<'de> Deserialize<'de> for CrateVersion
impl<'de> Deserialize<'de> for CrateVersion
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CrateVersion
impl Display for CrateVersion
impl Eq for CrateVersion
Source§impl FromStr for CrateVersion
impl FromStr for CrateVersion
Source§impl Hash for CrateVersion
impl Hash for CrateVersion
Source§impl Ord for CrateVersion
impl Ord for CrateVersion
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 CrateVersion
impl PartialEq for CrateVersion
Source§impl PartialOrd for CrateVersion
impl PartialOrd for CrateVersion
Source§impl PartialSchema for CrateVersion
impl PartialSchema for CrateVersion
Source§impl Serialize for CrateVersion
impl Serialize for CrateVersion
impl StructuralPartialEq for CrateVersion
Auto Trait Implementations§
impl Freeze for CrateVersion
impl RefUnwindSafe for CrateVersion
impl Send for CrateVersion
impl Sync for CrateVersion
impl Unpin for CrateVersion
impl UnsafeUnpin for CrateVersion
impl UnwindSafe for CrateVersion
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.