pub struct SemanticVersion(/* private fields */);Expand description
A strict SemVer 2.0.0 identity used for pinned protocol artifacts.
Implementations§
Source§impl SemanticVersion
impl SemanticVersion
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ValidationError>
pub fn new(value: impl Into<String>) -> Result<Self, ValidationError>
Parse a bounded SemVer 2.0.0 version without accepting loose aliases.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume the version and return its wire representation.
Trait Implementations§
Source§impl Clone for SemanticVersion
impl Clone for SemanticVersion
Source§impl Debug for SemanticVersion
impl Debug for SemanticVersion
Source§impl<'de> Deserialize<'de> for SemanticVersion
impl<'de> Deserialize<'de> for SemanticVersion
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SemanticVersion
Source§impl From<SemanticVersion> for String
impl From<SemanticVersion> for String
Source§fn from(value: SemanticVersion) -> Self
fn from(value: SemanticVersion) -> Self
Converts to this type from the input type.
Source§impl FromStr for SemanticVersion
impl FromStr for SemanticVersion
Source§impl Hash for SemanticVersion
impl Hash for SemanticVersion
Source§impl Ord for SemanticVersion
impl Ord for SemanticVersion
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 SemanticVersion
impl PartialEq for SemanticVersion
Source§impl PartialOrd for SemanticVersion
impl PartialOrd for SemanticVersion
Source§impl Serialize for SemanticVersion
impl Serialize for SemanticVersion
impl StructuralPartialEq for SemanticVersion
Source§impl TryFrom<&str> for SemanticVersion
impl TryFrom<&str> for SemanticVersion
Auto Trait Implementations§
impl Forget for SemanticVersion
impl Freeze for SemanticVersion
impl Move for SemanticVersion
impl RefUnwindSafe for SemanticVersion
impl Send for SemanticVersion
impl Sync for SemanticVersion
impl Unpin for SemanticVersion
impl UnsafeUnpin for SemanticVersion
impl UnwindSafe for SemanticVersion
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