Struct uvm_install2::Version
source · pub struct Version { /* private fields */ }Implementations
sourceimpl Version
impl Version
pub fn new(
major: u64,
minor: u64,
patch: u64,
release_type: VersionType,
revision: u64
) -> Version
pub fn from_path<P>(path: P) -> Result<Version, VersionError>where
P: AsRef<Path>,
pub fn a(major: u64, minor: u64, patch: u64, revision: u64) -> Version
pub fn b(major: u64, minor: u64, patch: u64, revision: u64) -> Version
pub fn p(major: u64, minor: u64, patch: u64, revision: u64) -> Version
pub fn f(major: u64, minor: u64, patch: u64, revision: u64) -> Version
pub fn release_type(&self) -> &VersionType
pub fn version_hash(&self) -> Result<String, VersionError>
pub fn major(&self) -> u64
pub fn minor(&self) -> u64
pub fn patch(&self) -> u64
pub fn revision(&self) -> u64
pub fn find_version_in_file<P>(path: P) -> Result<Version, VersionError>where
P: AsRef<Path>,
pub fn base(&self) -> &Version
pub fn as_semver(&self) -> Version
pub fn set_version_hash(&mut self, hash: Option<String>)
pub fn has_version_hash(&self) -> bool
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Version
impl<'de> Deserialize<'de> for Version
sourcefn deserialize<D>(
deserializer: D
) -> Result<Version, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Version, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Installation> for Version
impl From<Installation> for Version
sourcefn from(item: Installation) -> Version
fn from(item: Installation) -> Version
Converts to this type from the input type.
sourceimpl FromStr for Version
impl FromStr for Version
type Err = VersionError
type Err = VersionError
The associated error which can be returned from parsing.
sourceimpl Ord for Version
impl Ord for Version
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Version> for Version
impl PartialOrd<Version> for Version
sourcefn partial_cmp(&self, other: &Version) -> Option<Ordering>
fn partial_cmp(&self, other: &Version) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl Serialize for Version
impl Serialize for Version
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl TryFrom<&Path> for Version
impl TryFrom<&Path> for Version
type Error = VersionError
type Error = VersionError
The type returned in the event of a conversion error.
sourceimpl TryFrom<PathBuf> for Version
impl TryFrom<PathBuf> for Version
type Error = VersionError
type Error = VersionError
The type returned in the event of a conversion error.
impl Eq for Version
impl StructuralEq for Version
Auto Trait Implementations
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.