Struct rhyoea_common::helpers::version::Version[][src]

pub struct Version { /* fields omitted */ }

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]

impl StructuralPartialEq for Version[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.