diff options
| author | Joe Ellis <joe.ellis@arm.com> | 2020-09-08 13:11:13 +0100 |
|---|---|---|
| committer | Joe Ellis <joe.ellis@arm.com> | 2020-09-14 10:31:56 +0100 |
| commit | fa697dfa8179b7f5c5a1207935828e3a938f2fea (patch) | |
| tree | 25fa79d6ee4013c5168983e79d3e322ee4f109a5 /library/std/src | |
| parent | 7c20be387b1d9447289c0ddd1cd3300bf3199b35 (diff) | |
| download | rust-fa697dfa8179b7f5c5a1207935828e3a938f2fea.tar.gz rust-fa697dfa8179b7f5c5a1207935828e3a938f2fea.zip | |
Add documentation to public fields of UCred struct
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/unix/ext/ucred.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/ext/ucred.rs b/library/std/src/sys/unix/ext/ucred.rs index f7af9f5e96e..97f10e52b06 100644 --- a/library/std/src/sys/unix/ext/ucred.rs +++ b/library/std/src/sys/unix/ext/ucred.rs @@ -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>, } |
