pub struct Version { /* private fields */ }Implementations§
Source§impl Version
impl Version
pub fn new( major: u64, minor: u64, patch: u64, release_type: VersionType, revision: u64, ) -> Version
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Version, VersionError>
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: AsRef<Path>>( path: P, ) -> Result<Version, VersionError>
pub fn base(&self) -> &Version
pub fn as_semver(&self) -> Version
pub fn set_version_hash<S: AsRef<str>>(&mut self, hash: Option<S>)
pub fn has_version_hash(&self) -> bool
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 From<Installation> for Version
impl From<Installation> for Version
Source§fn from(item: Installation) -> Self
fn from(item: Installation) -> Self
Converts to this type from the input type.
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
Source§impl TryFrom<&Path> for Version
impl TryFrom<&Path> for Version
Source§type Error = VersionError
type Error = VersionError
The type returned in the event of a conversion error.
Source§impl TryFrom<PathBuf> for Version
impl TryFrom<PathBuf> for Version
Source§type Error = VersionError
type Error = VersionError
The type returned in the event of a conversion error.
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 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> 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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more