Struct std::os::unix::net::UCred[−][src]

pub struct UCred {
    pub uid: uid_t,
    pub gid: gid_t,
    pub pid: Option<pid_t>,
}
🔬 This is a nightly-only experimental API. (peer_credentials_unix_socket #42839)

unstable

This is supported on Unix only.
Expand description

UNIX 进程的凭据以用于凭据传递。

Fields

uid: uid_t
🔬 This is a nightly-only experimental API. (peer_credentials_unix_socket #42839)

unstable

对等凭证的 UID 部分。 这是域套接字端点处进程的有效 UID。

gid: gid_t
🔬 This is a nightly-only experimental API. (peer_credentials_unix_socket #42839)

unstable

对等凭证的 GID 部分。 这是域套接字端点处进程的有效 GID。

pid: Option<pid_t>
🔬 This is a nightly-only experimental API. (peer_credentials_unix_socket #42839)

unstable

对等凭证的 PID 部分。该字段是可选的,因为并非每个平台都支持对等凭据的 PID 部分。 在存在发现 PID 的机制的平台上,此字段将填充到域套接字端点处的进程的 PID。

否则,它将设置为 None。

Trait Implementations

返回值的副本。 Read more

从 source 执行复制分配。 Read more

使用给定的格式化程序格式化该值。 Read more

将该值输入给定的 Hasher。 Read more

将这种类型的切片送入给定的 Hasher 中。 Read more

此方法测试 self 和 other 值是否相等,并由 == 使用。 Read more

此方法测试 !=。

Auto Trait Implementations

Blanket Implementations

获取 self 的 TypeId。 Read more

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

从拥有的值中借用。 Read more

执行转换。

执行转换。

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

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

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

recently added

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

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

执行转换。

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

执行转换。