Add documentation to public fields of UCred struct
This commit is contained in:
parent
7c20be387b
commit
fa697dfa81
1 changed files with 8 additions and 1 deletions
|
@ -12,9 +12,16 @@ use libc::{gid_t, pid_t, uid_t};
|
|||
#[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")]
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
pub struct UCred {
|
||||
/// The UID part of the peer credential. This is the effective UID of the process at the domain
|
||||
/// socket's endpoint.
|
||||
pub uid: uid_t,
|
||||
/// The GID part of the peer credential. This is the effective GID of the process at the domain
|
||||
/// socket's endpoint.
|
||||
pub gid: gid_t,
|
||||
// pid field is an option because it is not supported on some platforms.
|
||||
/// The PID part of the peer credential. This field is optional because the PID part of the
|
||||
/// peer credentials is not supported on every platform. On platforms where the mechanism to
|
||||
/// discover the PID exists, this field will be populated to the PID of the process at the
|
||||
/// domain socket's endpoint. Otherwise, it will be set to None.
|
||||
pub pid: Option<pid_t>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue