Struct ClientConfig
pub struct ClientConfig {
pub ssh_config_path: String,
pub program: String,
pub arguments: Vec<String>,
pub username_host_placeholder: String,
pub disabled_console_color: u16,
pub highlighted_console_color: u16,
}Expand description
Representation of the client subcommand configurations.
Fields§
§ssh_config_path: String§program: String§arguments: Vec<String>List of arguments provided to the program.
Must include the username_host_placeholder.
§Example
['-XY', '{{USERNAME_AT_HOST}}']
username_host_placeholder: StringPlaceholder string used to inject <user>@<host> into the list of arguments.
§Example
'{{USERNAME_AT_HOST}}'
disabled_console_color: u16Controls back- and foreground colors of the client console window
when the client is in the Disabled state.
Uses the same encoding as DaemonConfig::console_color.
All standard Windows color combinations are available:
FOREGROUND_BLUE: 1
FOREGROUND_GREEN: 2
FOREGROUND_RED: 4
FOREGROUND_INTENSITY: 8
BACKGROUND_BLUE: 16
BACKGROUND_GREEN: 32
BACKGROUND_RED: 64
BACKGROUND_INTENSITY: 128 \
§Example
Default-grey font on muted dark-grey background:
4 + 2 + 1 + 128 = 135
highlighted_console_color: u16Controls back- and foreground colors of the client console window while it is the currently selected window in the daemon’s enable/disable submenu.
Uses the same encoding as DaemonConfig::console_color.
All standard Windows color combinations are available:
FOREGROUND_BLUE: 1
FOREGROUND_GREEN: 2
FOREGROUND_RED: 4
FOREGROUND_INTENSITY: 8
BACKGROUND_BLUE: 16
BACKGROUND_GREEN: 32
BACKGROUND_RED: 64
BACKGROUND_INTENSITY: 128 \
§Example
Bright-white font on blue background:
4 + 2 + 1 + 8 + 16 = 31
Trait Implementations§
§impl Debug for ClientConfig
impl Debug for ClientConfig
§impl Default for ClientConfig
impl Default for ClientConfig
§fn default() -> Self
fn default() -> Self
Returns a sensible default ClientConfig.
§Returns
ClientConfig with the following values:
ssh_config_path-%USERPROFILE%\.ssh\configprogram-ssharguments--XY {{USERNAME_AT_HOST}}username_host_placeholder-{{USERNAME_AT_HOST}}disabled_console_color-135highlighted_console_color-31
Note: %USERPROFILE% actually is resolved by us, so the actual value is whatever the environment variable at runtime points to.
§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
§impl From<ClientConfig> for ClientConfigOpt
impl From<ClientConfig> for ClientConfigOpt
§fn from(val: ClientConfig) -> Self
fn from(val: ClientConfig) -> Self
Wraps all configuration values as options.
§impl From<ClientConfigOpt> for ClientConfig
impl From<ClientConfigOpt> for ClientConfig
§fn from(val: ClientConfigOpt) -> Self
fn from(val: ClientConfigOpt) -> Self
Unwraps the existing configuration values or applies the default.