pub struct Version { /* private fields */ }Expand description
A simple representation of a semantic version.
Implementations§
Source§impl Version
impl Version
Sourcepub const fn new(raw: &'static str, major: u32, minor: u32, patch: u32) -> Self
pub const fn new(raw: &'static str, major: u32, minor: u32, patch: u32) -> Self
Creates a new Version from the given raw string and its component numbers.
Sourcepub fn major(&self) -> u32
pub fn major(&self) -> u32
Returns the major version number.
If the major version number isn’t present in the version string, this will return 0.
Trait Implementations§
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