pub struct OS_VERSION { /* private fields */ }
Expand description
A cached struct containing OS version for runtime checks.
Methods from Deref<Target = Info>
sourcepub fn os_type(&self) -> Type
pub fn os_type(&self) -> Type
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());
sourcepub fn version(&self) -> &Version
pub fn version(&self) -> &Version
Returns operating system version. See Version
for details.
Examples
use os_info::{Info, Version};
let info = Info::unknown();
assert_eq!(&Version::Unknown, info.version());
sourcepub fn edition(&self) -> Option<&str>
pub fn edition(&self) -> Option<&str>
Returns optional operation system edition.
Examples
use os_info::Info;
let info = Info::unknown();
assert_eq!(None, info.edition());
Trait Implementations
sourceimpl Deref for OS_VERSION
impl Deref for OS_VERSION
impl LazyStatic for OS_VERSION
Auto Trait Implementations
impl RefUnwindSafe for OS_VERSION
impl Send for OS_VERSION
impl Sync for OS_VERSION
impl Unpin for OS_VERSION
impl UnwindSafe for OS_VERSION
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more