Struct std::os::unix::net::SocketCred[][src]

pub struct SocketCred(_);
🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Unix only.
Expand description

Unix credential.

Implementations

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

创建 Unix 凭据结构体。

PID,UID 和 GID 设置为 0。

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

设置 PID。

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

获取当前的 PID。

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

设置 UID。

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

获取当前的 UID。

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

设置 GID。

🔬 This is a nightly-only experimental API. (unix_socket_ancillary_data #76915)
This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

获取当前的 GID。

Trait Implementations

This is supported on Android or DragonFly BSD or Emscripten or FreeBSD or Linux or NetBSD or OpenBSD only.

返回值的副本。 Read more

source 执行复制分配。 Read more

Auto Trait Implementations

Blanket Implementations

获取 selfTypeIdRead more

从拥有的值中一成不变地借用。 Read more

从拥有的值中借用。 Read more

执行转换。

执行转换。

获得所有权后的结果类型。

通常通过克隆从借用数据中创建拥有的数据。 Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into #41263)

recently added

使用借来的数据来替换拥有的数据,通常是通过克隆。 Read more

发生转换错误时返回的类型。

执行转换。

发生转换错误时返回的类型。

执行转换。