Struct wezterm_ssh::Config [−][src]
pub struct Config { /* fields omitted */ }
A context for resolving configuration values. Holds a combination of environment and token expansion state, as well as the set of configs that should be consulted.
Implementations
impl Config
[src]
impl Config
[src]pub fn new() -> Self
[src]
Create a new context without any config files loaded
pub fn assign_environment(&mut self, env: ConfigMap)
[src]
Assign a fake environment map, useful for testing. The environment is used to expand certain values from the config.
pub fn assign_tokens(&mut self, tokens: ConfigMap)
[src]
Assigns token names and expansions for use with a number of
options. The names and expansions are specified
by man 5 ssh_config
pub fn set_option<K: AsRef<str>, V: AsRef<str>>(&mut self, key: K, value: V)
[src]
Assign the value for an option. This is logically equivalent to the user specifying command line options to override config values. These values take precedence over any values found in config files.
pub fn add_config_string(&mut self, config_string: &str)
[src]
Parse config_string
as if it were the contents of an ssh_config
file,
and add that to the list of configs.
pub fn add_config_file<P: AsRef<Path>>(&mut self, path: P)
[src]
Open path
, read its contents and parse it as an ssh_config
file,
adding that to the list of configs
pub fn add_default_config_files(&mut self)
[src]
Convenience method for adding the ~/.ssh/config and system-wide
/etc/ssh/config
files to the list of configs
pub fn for_host<H: AsRef<str>>(&self, host: H) -> ConfigMap
[src]
Resolve the configuration for a given host.
The returned map will expand environment and tokens for options
where that is specified.
Note that in some configurations, the config should be parsed once
to resolve the main configuration, and then based on some options
(such as CanonicalHostname), the tokens should be updated and
the config parsed a second time in order for value expansion
to have the same results as ssh
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl RefUnwindSafe for Config
impl UnwindSafe for Config
impl UnwindSafe for Config