Movatterモバイル変換


[0]ホーム

URL:


hostname

std::net

Functionhostname 

Source
pub fn hostname() ->Result<OsString>
🔬This is a nightly-only experimental API. (gethostname #135142)
Expand description

Returns the system hostname.

This can error out in platform-specific error cases;for example, uefi and wasm, where hostnames aren’tsupported.

§Underlying system calls

PlatformSystem call
UNIXgethostname
WindowsGetHostNameW

Note that platform-specific behaviormay change in the future.


[8]ページ先頭

©2009-2026 Movatter.jp