pub struct HostEntry {
pub alias: String,
pub hostname: String,
pub user: String,
pub port: u16,
pub identity_file: String,
pub proxy_jump: String,
pub source_file: Option<PathBuf>,
pub tags: Vec<String>,
pub provider: Option<String>,
pub tunnel_count: u16,
pub askpass: Option<String>,
pub provider_meta: Vec<(String, String)>,
}Expand description
Convenience view for the TUI — extracted from a HostBlock.
Fields§
§alias: String§hostname: String§user: String§port: u16§identity_file: String§proxy_jump: String§source_file: Option<PathBuf>If this host comes from an included file, the file path.
Tags from purple:tags comment.
provider: Option<String>Cloud provider label from purple:provider comment (e.g. “do”, “vultr”).
tunnel_count: u16Number of tunnel forwarding directives.
askpass: Option<String>Password source from purple:askpass comment (e.g. “keychain”, “op://…”, “pass:…”).
provider_meta: Vec<(String, String)>Provider metadata from purple:meta comment (region, plan, etc.).
Implementations§
Source§impl HostEntry
impl HostEntry
Sourcepub fn ssh_command(&self, config_path: &Path) -> String
pub fn ssh_command(&self, config_path: &Path) -> String
Build the SSH command string for this host.
Includes -F <config_path> when the config is non-default so the alias
resolves correctly when pasted into a terminal.
Shell-quotes both the config path and alias to prevent injection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostEntry
impl RefUnwindSafe for HostEntry
impl Send for HostEntry
impl Sync for HostEntry
impl Unpin for HostEntry
impl UnsafeUnpin for HostEntry
impl UnwindSafe for HostEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more