[−][src]Struct sentry_release_parser::Version
Represents a parsed version.
Methods
impl<'a> Version<'a>
[src]
pub fn parse(version: &'a str) -> Result<Version<'a>, InvalidVersion>
[src]
Parses a version from a string.
pub fn as_semver(&self) -> Version
[src]
Converts the version into a semver.
Requires the semver
feature.
pub fn major(&self) -> u64
[src]
Returns the major version component.
pub fn minor(&self) -> u64
[src]
Returns the minor version component.
pub fn patch(&self) -> u64
[src]
Returns the patch level version component.
pub fn pre(&self) -> Option<&str>
[src]
If a pre-release identifier is included returns that.
pub fn build_code(&self) -> Option<&str>
[src]
If a build code is included returns that.
pub fn normalized_build_code(&self) -> String
[src]
Returns an internally normalized build code.
This value is useful for ordering but it should never be shown to a user as it might be very confusing. For instance if a build code looks like a dotted version it ends up being padded to 32 characters.
pub fn raw(&self) -> &str
[src]
Returns the raw version as string.
It's generally better to use to_string
which normalizes.
pub fn triple(&self) -> (u64, u64, u64)
[src]
Returns the version triple (major, minor, patch)
pub fn quad(&self) -> (u64, u64, u64, Option<&str>)
[src]
Returns the version triple with an added pre-release marker.
Trait Implementations
impl<'a> Clone for Version<'a>
[src]
impl<'a> Debug for Version<'a>
[src]
impl<'a> Display for Version<'a>
[src]
impl<'a> PartialEq<Version<'a>> for Version<'a>
[src]
impl<'a> StructuralPartialEq for Version<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Version<'a>
impl<'a> Send for Version<'a>
impl<'a> Sync for Version<'a>
impl<'a> Unpin for Version<'a>
impl<'a> UnwindSafe for Version<'a>
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,