pub fn get_hostname() -> Result<OsString, Error>
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.