pub struct Resolved {
pub path: OsString,
pub source: Source,
pub capture: Capture,
pub added: usize,
pub fallback: Vec<PathBuf>,
pub cached: Option<CachedPath>,
pub changed: bool,
pub network: Vec<(String, String)>,
}Expand description
The outcome of apply: the merged PATH and how it was made.
Fields§
§path: OsString§source: Source§capture: CaptureWhether the login shell or the registry was asked, and the result.
added: usizeEntries the capture, the saved PATH and the fallback folders added
to the inherited PATH.
fallback: Vec<PathBuf>The usual install folders (super::FALLBACK_DIRECTORIES) appended to
path, in order.
cached: Option<CachedPath>The saved PATH, when the shell failed and it was used.
changed: boolWhether path differs from the inherited PATH, by new entries or
by order.
network: Vec<(String, String)>Network variables the login shell sets and this process lacks.
Implementations§
Source§impl Resolved
impl Resolved
Sourcepub fn capture_failed(&self) -> bool
pub fn capture_failed(&self) -> bool
Whether the login shell or the registry was asked and failed.
Sourcepub fn path_from(&self) -> &'static str
pub fn path_from(&self) -> &'static str
What supplied the PATH: login_shell, registry, terminal,
disabled, or after a failed capture cache when saved folders were
added, else fallback.
Sourcepub fn log_fields(&self, now: DateTime<Utc>) -> Vec<(&'static str, String)>
pub fn log_fields(&self, now: DateTime<Utc>) -> Vec<(&'static str, String)>
The fields of the startup path log record at now. cache_age is
whole seconds since the saved PATH was written, or -. The fields
name sources and appended folders and count entries and variables;
they never hold the PATH value or an environment variable, because
proxy variables can hold credentials.