pub struct Defaults { /* private fields */ }Expand description
Runtime configuration with sane defaults.
Mirrors the four config dictionaries from the Python implementation:
_task_default, _task_info, _nodeset, _engine.
Implementations§
Source§impl Defaults
impl Defaults
Sourcepub fn from_config(paths: &[PathBuf]) -> Self
pub fn from_config(paths: &[PathBuf]) -> Self
Load defaults from config file paths.
Files are read in order; later files override earlier ones. Only files that actually exist on disk are parsed.
Sourcepub fn get(&self, name: &str) -> Option<&ConfigValue>
pub fn get(&self, name: &str) -> Option<&ConfigValue>
Look up a config attribute by name.
Search order matches the Python __getattr__:
engine -> task_default -> task_info -> nodeset.
Special case: port_qlimit falls back to task_default if engine
value is unchanged from the built-in default (1.8 compat).
Sourcepub fn set(&mut self, name: &str, value: ConfigValue) -> bool
pub fn set(&mut self, name: &str, value: ConfigValue) -> bool
Set a config attribute by name.
Searches the same order as get().
Sourcepub fn connect_timeout(&self) -> f64
pub fn connect_timeout(&self) -> f64
Get the connect timeout.
Sourcepub fn command_timeout(&self) -> f64
pub fn command_timeout(&self) -> f64
Get the command timeout.
Sourcepub fn local_workername(&self) -> &str
pub fn local_workername(&self) -> &str
Get the local worker name.
Sourcepub fn distant_workername(&self) -> &str
pub fn distant_workername(&self) -> &str
Get the distant worker name.
Sourcepub fn port_qlimit(&self) -> i64
pub fn port_qlimit(&self) -> i64
Get the port queue limit.
Sourcepub fn grooming_delay(&self) -> f64
pub fn grooming_delay(&self) -> f64
Get the grooming delay.