Struct sentry_release_parser::Release
source · pub struct Release<'a> { /* private fields */ }
Expand description
Represents a parsed release.
Implementations§
source§impl<'a> Release<'a>
impl<'a> Release<'a>
sourcepub fn parse(release: &'a str) -> Result<Release<'a>, InvalidRelease>
pub fn parse(release: &'a str) -> Result<Release<'a>, InvalidRelease>
Parses a release from a string.
sourcepub fn raw(&self) -> &'a str
pub fn raw(&self) -> &'a str
Returns the raw version.
It’s generally better to use to_string
which normalizes.
sourcepub fn version_raw(&self) -> &'a str
pub fn version_raw(&self) -> &'a str
The raw version part of the release.
This is set even if the version part is not a valid version (for instance because it’s a hash).
sourcepub fn build_hash(&self) -> Option<&'a str>
pub fn build_hash(&self) -> Option<&'a str>
Returns the build hash if available.
sourcepub fn describe(&self) -> ReleaseDescription<'_>
pub fn describe(&self) -> ReleaseDescription<'_>
Returns a short description.
This returns a human readable format that includes an abbreviated name of the release. Typically it will remove the package and it will try to abbreviate build hashes etc.
Trait Implementations§
source§impl<'a> PartialEq<Release<'a>> for Release<'a>
impl<'a> PartialEq<Release<'a>> for Release<'a>
impl<'a> StructuralPartialEq for Release<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Release<'a>
impl<'a> Send for Release<'a>
impl<'a> Sync for Release<'a>
impl<'a> Unpin for Release<'a>
impl<'a> UnwindSafe for Release<'a>
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