pub struct SshHost {
pub alias: String,
pub hostname: Option<String>,
pub user: Option<String>,
pub port: Option<u16>,
pub identity_file: Option<String>,
pub proxy_jump: Option<String>,
pub source: SshHostSource,
}Expand description
A discovered SSH host with connection details
Fields§
§alias: StringThe Host alias from SSH config, or hostname from other sources
hostname: Option<String>Resolved hostname or IP address
user: Option<String>SSH username
port: Option<u16>SSH port (None means default 22)
identity_file: Option<String>Path to identity file
proxy_jump: Option<String>ProxyJump host
source: SshHostSourceWhere this host was discovered from
Implementations§
Source§impl SshHost
impl SshHost
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Get the display name for this host (alias or hostname)
Sourcepub fn connection_target(&self) -> &str
pub fn connection_target(&self) -> &str
Get the connection target (hostname or alias)
Sourcepub fn ssh_args(&self) -> Vec<String>
pub fn ssh_args(&self) -> Vec<String>
Build the ssh command arguments for connecting to this host
Sourcepub fn connection_string(&self) -> String
pub fn connection_string(&self) -> String
Build a display string showing user@host:port
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SshHost
impl<'de> Deserialize<'de> for SshHost
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SshHost
impl RefUnwindSafe for SshHost
impl Send for SshHost
impl Sync for SshHost
impl Unpin for SshHost
impl UnsafeUnpin for SshHost
impl UnwindSafe for SshHost
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
Mutably borrows from an owned value. Read more