Skip to content

Commit

Permalink
Improve documentation for ProcessRefreshKind
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 14, 2023
1 parent 7ccbb7c commit a0c2e75
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,12 @@ assert_eq!(r.", stringify!($name), "().is_some(), false);

/// Used to determine what you want to refresh specifically on the [`Process`] type.
///
/// When all refresh are ruled out, a [`Process`] will still retrieve the following information:
/// * Process ID ([`Pid`])
/// * Parent process ID
/// * Process name
/// * Start time
///
/// ⚠️ Just like all other refresh types, ruling out a refresh doesn't assure you that
/// the information won't be retrieved if the information is accessible without needing
/// extra computation.
Expand Down Expand Up @@ -1498,7 +1504,19 @@ impl ProcessRefreshKind {
with_disk_usage,
without_disk_usage
);
impl_get_set!(ProcessRefreshKind, user, with_user, without_user);
impl_get_set!(
ProcessRefreshKind,
user,
with_user,
without_user,
"\
It will retrieve the following information:
* user ID
* user effective ID (if available on the platform)
* user group ID (if available on the platform)
* user effective ID (if available on the platform)"
);
impl_get_set!(ProcessRefreshKind, memory, with_memory, without_memory);
impl_get_set!(ProcessRefreshKind, cwd, with_cwd, without_cwd);
impl_get_set!(ProcessRefreshKind, root, with_root, without_root);
Expand Down

0 comments on commit a0c2e75

Please sign in to comment.