pub struct GoModuleVersion(/* private fields */);Expand description
Validated Go module version metadata.
Implementations§
Source§impl GoModuleVersion
impl GoModuleVersion
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, GoModuleError>
pub fn new(value: impl AsRef<str>) -> Result<Self, GoModuleError>
Creates a Go module version label.
§Errors
Returns GoModuleError when the version is empty or not lightweight vMAJOR.MINOR.PATCH-shaped.
Sourcepub fn is_pseudo_version(&self) -> bool
pub fn is_pseudo_version(&self) -> bool
Returns whether this label is pseudo-version-shaped.
Trait Implementations§
Source§impl AsRef<str> for GoModuleVersion
impl AsRef<str> for GoModuleVersion
Source§impl Clone for GoModuleVersion
impl Clone for GoModuleVersion
Source§fn clone(&self) -> GoModuleVersion
fn clone(&self) -> GoModuleVersion
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 GoModuleVersion
impl Debug for GoModuleVersion
Source§impl Display for GoModuleVersion
impl Display for GoModuleVersion
Source§impl FromStr for GoModuleVersion
impl FromStr for GoModuleVersion
Source§impl Hash for GoModuleVersion
impl Hash for GoModuleVersion
Source§impl Ord for GoModuleVersion
impl Ord for GoModuleVersion
Source§fn cmp(&self, other: &GoModuleVersion) -> Ordering
fn cmp(&self, other: &GoModuleVersion) -> 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
Source§impl PartialEq for GoModuleVersion
impl PartialEq for GoModuleVersion
Source§fn eq(&self, other: &GoModuleVersion) -> bool
fn eq(&self, other: &GoModuleVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GoModuleVersion
impl PartialOrd for GoModuleVersion
Source§impl TryFrom<&str> for GoModuleVersion
impl TryFrom<&str> for GoModuleVersion
impl Eq for GoModuleVersion
impl StructuralPartialEq for GoModuleVersion
Auto Trait Implementations§
impl Freeze for GoModuleVersion
impl RefUnwindSafe for GoModuleVersion
impl Send for GoModuleVersion
impl Sync for GoModuleVersion
impl Unpin for GoModuleVersion
impl UnsafeUnpin for GoModuleVersion
impl UnwindSafe for GoModuleVersion
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