Crate hostname

Source
Expand description

A crate with utilities to get and set the system’s host name.

§Examples

Set and get the host name:

hostname::set("potato")?;
let new_name = hostname::get()?;
assert_eq!(new_name, OsStr::new("potato"));

Functions§

get
Return the system hostname.
setset
Set the system hostname.