Skip to main content

UNameAPI

Trait UNameAPI 

Source
pub trait UNameAPI {
    // Required methods
    fn sysname(&self) -> &OsStr;
    fn nodename(&self) -> &OsStr;
    fn release(&self) -> &OsStr;
    fn version(&self) -> &OsStr;
    fn machine(&self) -> &OsStr;
    fn processor(&self) -> &OsStr;
    fn osname(&self) -> &OsStr;
}
Expand description

Defines a trait API providing uname (aka “Unix name”) style platform information.

Required Methods§

Source

fn sysname(&self) -> &OsStr

The name of this implementation of the operating system.

Source

fn nodename(&self) -> &OsStr

The node name (network node hostname) of this machine.

Source

fn release(&self) -> &OsStr

The current release level of the operating system.

Source

fn version(&self) -> &OsStr

The current version level of the current release.

Source

fn machine(&self) -> &OsStr

The name of the current system’s hardware.

Source

fn processor(&self) -> &OsStr

The processor type (architecture) of the current system.

Maps machine architecture strings to GNU coreutils-compatible processor types. For example, “arm64” may map to “arm”, “x86_64” to “x86_64”, etc. This provides more semantically meaningful processor information than the raw machine string in some contexts.

Source

fn osname(&self) -> &OsStr

The name of the current OS.

Implementors§