pub struct SshConfigPaths {
pub user: Option<PathBuf>,
pub system: Option<PathBuf>,
}Expand description
Locations of the ssh_config files to read during a resolve call.
Both fields are optional so callers can disable either tier (e.g.
gitway --no-config) or supply an isolated config file for testing.
Paths are expected to be absolute or already tilde-expanded; relative
paths are read relative to the current working directory. The leading
~ is expanded automatically as a courtesy.
Fields§
§user: Option<PathBuf>User-level config, typically ~/.ssh/config on Unix and
%USERPROFILE%\.ssh\config on Windows. None skips reading it.
system: Option<PathBuf>System-level config, typically /etc/ssh/ssh_config on Unix and
%PROGRAMDATA%\ssh\ssh_config on Windows. None skips reading.
Implementations§
Source§impl SshConfigPaths
impl SshConfigPaths
Sourcepub fn default_paths() -> Self
pub fn default_paths() -> Self
Returns the platform-default paths.
On Unix: ~/.ssh/config (user) and /etc/ssh/ssh_config (system).
On Windows: %USERPROFILE%\.ssh\config (user) and
%PROGRAMDATA%\ssh\ssh_config (system, if %PROGRAMDATA% is set).
On other platforms: user only, system None.
Trait Implementations§
Source§impl Clone for SshConfigPaths
impl Clone for SshConfigPaths
Source§fn clone(&self) -> SshConfigPaths
fn clone(&self) -> SshConfigPaths
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SshConfigPaths
impl Debug for SshConfigPaths
Source§impl Default for SshConfigPaths
impl Default for SshConfigPaths
Source§fn default() -> SshConfigPaths
fn default() -> SshConfigPaths
Source§impl PartialEq for SshConfigPaths
impl PartialEq for SshConfigPaths
Source§fn eq(&self, other: &SshConfigPaths) -> bool
fn eq(&self, other: &SshConfigPaths) -> bool
self and other values to be equal, and is used by ==.