[−][src]Enum versions::Versioning
A top-level Versioning type which acts as a wrapper for the more specific types.
Examples
use versions::Versioning; let a = Versioning::new("1.2.3-1").unwrap(); // SemVer. let b = Versioning::new("1.2.3r1").unwrap(); // Not SemVer but good enough. let c = Versioning::new("000.007-1").unwrap(); // Garbage. assert!(a.is_ideal()); assert!(b.is_general()); assert!(c.is_complex());
Variants
Ideal(SemVer)General(Version)Complex(Mess)Implementations
impl Versioning[src]
pub fn new(s: &str) -> Option<Versioning>[src]
Create a Versioning by attempting to parse the input first as
SemVer, then as a
Version, and finally as a
Mess.
pub fn is_ideal(&self) -> bool[src]
A short-hand for detecting an inner SemVer.
pub fn is_general(&self) -> bool[src]
A short-hand for detecting an inner Version.
pub fn is_complex(&self) -> bool[src]
A short-hand for detecting an inner Mess.
Trait Implementations
impl Clone for Versioning[src]
fn clone(&self) -> Versioning[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for Versioning[src]
impl Display for Versioning[src]
impl Eq for Versioning[src]
impl Hash for Versioning[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for Versioning[src]
fn cmp(&self, other: &Self) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<Versioning> for Versioning[src]
fn eq(&self, other: &Versioning) -> bool[src]
fn ne(&self, other: &Versioning) -> bool[src]
impl PartialOrd<Versioning> for Versioning[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for Versioning[src]
impl StructuralPartialEq for Versioning[src]
Auto Trait Implementations
impl RefUnwindSafe for Versioning
impl Send for Versioning
impl Sync for Versioning
impl Unpin for Versioning
impl UnwindSafe for Versioning
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,