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: StringName of the program used to establish the SSH connection.
Note specific to cmd.exe: a relayed Ctrl+C interrupts a running command
but cannot reprint its idle prompt (which needs a real focused keypress).
§Example
'ssh'
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.
§impl PartialEq for ClientConfig
impl PartialEq for ClientConfig
§impl Serialize for ClientConfig
impl Serialize for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.