[][src]Function gethostname::gethostname

pub fn gethostname() -> OsString

Get the standard hostname for the current machine.

Returns the DNS host name of the local computer, as returned by GetComputerNameExW with ComputerNamePhysicalDnsHostname flag has name type. This function may panic! if the internal buffer for the hostname is too small. Since we try to allocate a buffer large enough to hold the host name we consider panics a bug which you should report.