Skip to content

Commit fa697df

Browse files
author
Joe Ellis
committed
Add documentation to public fields of UCred struct
1 parent 7c20be3 commit fa697df

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

library/std/src/sys/unix/ext/ucred.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ use libc::{gid_t, pid_t, uid_t};
1212
#[unstable(feature = "peer_credentials_unix_socket", issue = "42839", reason = "unstable")]
1313
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1414
pub struct UCred {
15+
/// The UID part of the peer credential. This is the effective UID of the process at the domain
16+
/// socket's endpoint.
1517
pub uid: uid_t,
18+
/// The GID part of the peer credential. This is the effective GID of the process at the domain
19+
/// socket's endpoint.
1620
pub gid: gid_t,
17-
// pid field is an option because it is not supported on some platforms.
21+
/// The PID part of the peer credential. This field is optional because the PID part of the
22+
/// peer credentials is not supported on every platform. On platforms where the mechanism to
23+
/// discover the PID exists, this field will be populated to the PID of the process at the
24+
/// domain socket's endpoint. Otherwise, it will be set to None.
1825
pub pid: Option<pid_t>,
1926
}
2027

0 commit comments

Comments
 (0)