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)Available on Unix only.
Expand description
UNIX 进程的凭据以用于凭据传递。
Fields§
§uid: uid_t
🔬This is a nightly-only experimental API. (
peer_credentials_unix_socket
#42839)对等凭证的 UID 部分。 这是域套接字端点处进程的有效 UID。
gid: gid_t
🔬This is a nightly-only experimental API. (
peer_credentials_unix_socket
#42839)对等凭证的 GID 部分。 这是域套接字端点处进程的有效 GID。
pid: Option<pid_t>
🔬This is a nightly-only experimental API. (
peer_credentials_unix_socket
#42839)对等凭证的 PID 部分。该字段是可选的,因为并非每个平台都支持对等凭据的 PID 部分。 在存在发现 PID 的机制的平台上,此字段将填充到域套接字端点处的进程的 PID。
否则,它将设置为 None
。
Trait Implementations§
impl Copy for UCred
impl Eq for UCred
impl StructuralEq for UCred
impl StructuralPartialEq for UCred
Auto Trait Implementations§
impl RefUnwindSafe for UCred
impl Send for UCred
impl Sync for UCred
impl Unpin for UCred
impl UnwindSafe for UCred
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值中借用。 Read more