[−][src]Struct rubric::helpers::system::Version
Represents a programs version.
You probably don't want to build this directly, see the
Program
enum.
Implementations
impl Version
[src]
pub fn of(program: Program) -> Option<Self>
[src]
Returns the installed version of the program provided.
use rubric::helpers::system::{Version, Program}; // Tests that git is installed assert!(Version::of(Program::Git).is_some());
pub fn custom(major: u32, minor: u32, patch: u32) -> Self
[src]
Makes a custom version number. Mostly use to compare to another
let v = Version::custom(4, 5, 6); assert_eq!(v.major(), 4); assert_eq!(v.minor(), 5); assert_eq!(v.patch(), 6);
pub fn major(&self) -> u32
[src]
Returns the major version (first number)
pub fn minor(&self) -> u32
[src]
Returns the minor version (second number)
pub fn patch(&self) -> u32
[src]
Returns the patch version (third number)
Trait Implementations
impl Debug for Version
[src]
impl Display for Version
[src]
impl FromStr for Version
[src]
type Err = ParseIntError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
This splits by ".". Any values not found are set to 0.
impl PartialEq<Version> for Version
[src]
impl StructuralPartialEq for Version
[src]
Auto Trait Implementations
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
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> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,