pub struct RuntimeEnvironment {
pub command_line: Vec<String>,
pub working_dir: Option<PathBuf>,
pub core_affinity: Option<Vec<usize>>,
pub envvars: BTreeMap<String, Option<String>>,
}
Fields§
§command_line: Vec<String>
The full command line that this executable was invoked with
working_dir: Option<PathBuf>
The working directory of the program when the info!
macro was invoked
core_affinity: Option<Vec<usize>>
A list of the CPU core IDs that this process has in its affinity mask, if it has an affinity mask at all
envvars: BTreeMap<String, Option<String>>
Set of environment variables that have been explicitly gathered with
RummageInfo::with_envvar
/RummageInfo::with_envvars
.
Implementations§
Source§impl RuntimeEnvironment
impl RuntimeEnvironment
pub fn new() -> Self
Sourcepub fn with_envvar(self, name: impl AsRef<str>) -> Self
pub fn with_envvar(self, name: impl AsRef<str>) -> Self
Enriches the content of this RummageInfo
with the value of the given environment
variable
Sourcepub fn with_envvars(
self,
names: impl IntoIterator<Item = impl AsRef<str>>,
) -> Self
pub fn with_envvars( self, names: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self
Enrichves the content of this RummageInfo
with the values of all the given environment
variables
pub fn iter_props(&self) -> impl Iterator<Item = (&'static str, String)> + '_
pub fn log_debug(&self)
Trait Implementations§
Source§impl Clone for RuntimeEnvironment
impl Clone for RuntimeEnvironment
Source§fn clone(&self) -> RuntimeEnvironment
fn clone(&self) -> RuntimeEnvironment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RuntimeEnvironment
impl Debug for RuntimeEnvironment
Auto Trait Implementations§
impl Freeze for RuntimeEnvironment
impl RefUnwindSafe for RuntimeEnvironment
impl Send for RuntimeEnvironment
impl Sync for RuntimeEnvironment
impl Unpin for RuntimeEnvironment
impl UnwindSafe for RuntimeEnvironment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more