Function hostname::get

source ·
pub fn get() -> Result<OsString>
Expand description

Return the system hostname.

§Example

let name = hostname::get()?;

§Errors

If this function encounters any form of error, an error variant will be returned; in practice it is rare to be happen.