Struct rhyoea_common::helpers::version::Version [−][src]
The Version
type.
See the module level documentation for more
Implementations
impl Version
[src]
#[must_use]pub const fn new(major: u8, minor: u8, patch: u8) -> Self
[src]
Create a new Version
Example
use rhyoea_common::helpers::version::Version; let _ = Version::new(1, 10, 2);
impl Version
[src]
#[must_use]pub const fn major(self) -> u8
[src]
Extract the major version
Example
use rhyoea_common::helpers::version::Version; let version = Version::new(1, 10, 2); assert_eq!(1, version.major());
#[must_use]pub const fn minor(self) -> u8
[src]
Extract the minor version
Example
use rhyoea_common::helpers::version::Version; let version = Version::new(1, 10, 2); assert_eq!(10, version.minor());
#[must_use]pub const fn patch(self) -> u8
[src]
Extract the patch version
Example
use rhyoea_common::helpers::version::Version; let version = Version::new(1, 10, 2); assert_eq!(2, version.patch());
Trait Implementations
impl Clone for Version
[src]
impl Copy for Version
[src]
impl Debug for Version
[src]
impl Default for Version
[src]
impl PartialEq<Version> for Version
[src]
impl PartialOrd<Version> for Version
[src]
fn partial_cmp(&self, other: &Version) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for Version
[src]
Auto Trait Implementations
impl RefUnwindSafe for Version
[src]
impl Send for Version
[src]
impl Sync for Version
[src]
impl Unpin for Version
[src]
impl UnwindSafe for Version
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,