pub struct Version {
pub string_repr: String,
/* private fields */
}Expand description
High-performance version representation compatible with rez
Fields§
§string_repr: StringCached string representation
Implementations§
Source§impl Version
impl Version
Sourcepub fn epsilon() -> Self
pub fn epsilon() -> Self
Create the epsilon version (alias for empty, smallest possible version)
Sourcepub fn major(&self) -> Option<u64>
pub fn major(&self) -> Option<u64>
Get the major version component (first token as u64), if available
Sourcepub fn minor(&self) -> Option<u64>
pub fn minor(&self) -> Option<u64>
Get the minor version component (second token as u64), if available
Sourcepub fn patch(&self) -> Option<u64>
pub fn patch(&self) -> Option<u64>
Get the patch version component (third token as u64), if available
Sourcepub fn is_epsilon(&self) -> bool
pub fn is_epsilon(&self) -> bool
Check if this is the epsilon version (alias for is_empty)
Sourcepub fn is_prerelease(&self) -> bool
pub fn is_prerelease(&self) -> bool
Check if this version is a prerelease version
Sourcepub fn parse(s: &str) -> Result<Self, RezCoreError>
pub fn parse(s: &str) -> Result<Self, RezCoreError>
Parse a version string into a Version object
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Version
impl<'de> Deserialize<'de> for Version
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
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl Eq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.