pub struct Version { /* private fields */ }Expand description
Data structure that contains a version with a major, minor, and patch number as well as a map of commits that represent changes since the previous version.
Implementations§
Source§impl Version
impl Version
Sourcepub fn get(&self) -> String
pub fn get(&self) -> String
Gets the version in string form. Formatted, “v(major).(minor).(patch)”
Sourcepub fn short(&self) -> String
pub fn short(&self) -> String
Gets the version in short string form. Formatted, “(major).(minor).(patch)”
Sourcepub fn parse(version: &str) -> Option<(u32, u32, u32)>
pub fn parse(version: &str) -> Option<(u32, u32, u32)>
Parse a string into the appropriate version numbers. Returns a tuple containing the major, minor, and patch version numbers extracted from the string, if available.
pub fn new(major: u32, minor: u32, patch: u32, changes: CommitMap) -> Self
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
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