pub struct OS_VERSION { /* private fields */ }
Expand description

A cached struct containing OS version for runtime checks.

Methods from Deref<Target = Info>

Returns operating system type. See Type for details.

Examples
use os_info::{Info, Type};

let info = Info::unknown();
assert_eq!(Type::Unknown, info.os_type());

Returns operating system version. See Version for details.

Examples
use os_info::{Info, Version};

let info = Info::unknown();
assert_eq!(&Version::Unknown, info.version());

Returns optional operation system edition.

Examples
use os_info::Info;

let info = Info::unknown();
assert_eq!(None, info.edition());

Returns optional operation system ‘codename’.

Examples
use os_info::Info;

let info = Info::unknown();
assert_eq!(None, info.codename());

Returns operating system bitness. See Bitness for details.

Examples
use os_info::{Info, Bitness};

let info = Info::unknown();
assert_eq!(Bitness::Unknown, info.bitness());

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.