diff --git a/src/cli/remote.rs b/src/cli/remote.rs index c455912..3ccaa85 100644 --- a/src/cli/remote.rs +++ b/src/cli/remote.rs @@ -1,3 +1,8 @@ +//! ## Remote CLI Arguments +//! +//! Parses positional and bookmark-based CLI arguments into the normalized remote +//! connection parameters used by the application. + use std::path::{Path, PathBuf}; use super::Args; @@ -13,8 +18,11 @@ enum AddrType { /// Args for remote connection #[derive(Debug)] pub struct RemoteArgs { + /// Optional host bridge selected for the session. pub host_bridge: Remote, + /// Target remote selected for the session. pub remote: Remote, + /// Optional local working directory override. pub local_dir: Option, } @@ -109,6 +117,7 @@ pub enum Remote { } impl Remote { + /// Returns whether this CLI slot was left unspecified. pub fn is_none(&self) -> bool { matches!(self, Self::None) } diff --git a/src/host/bridge.rs b/src/host/bridge.rs index a31d44a..d85f2ed 100644 --- a/src/host/bridge.rs +++ b/src/host/bridge.rs @@ -1,3 +1,8 @@ +//! ## Host Bridge +//! +//! Defines the host abstraction used to expose localhost and bridged remote +//! filesystems through a shared interface. + use std::io::{Read, Write}; use std::path::{Path, PathBuf}; diff --git a/src/host/localhost.rs b/src/host/localhost.rs index a6c38fa..29a5989 100644 --- a/src/host/localhost.rs +++ b/src/host/localhost.rs @@ -1,3 +1,8 @@ +//! ## Localhost Host Bridge +//! +//! Implements the host bridge abstraction directly against the local +//! filesystem. + use std::fs::{self, OpenOptions}; use std::io::{Read, Write}; #[cfg(posix)] diff --git a/src/host/remote_bridged.rs b/src/host/remote_bridged.rs index 497d9bc..dccb472 100644 --- a/src/host/remote_bridged.rs +++ b/src/host/remote_bridged.rs @@ -1,3 +1,8 @@ +//! ## Remote Bridged Host +//! +//! Bridges a `RemoteFs` implementation behind the local host interface used by +//! the file transfer activity. + mod temp_mapped_file; use std::io::{Read, Write}; diff --git a/src/support/import_ssh_hosts.rs b/src/support/import_ssh_hosts.rs index b395d32..4f0c1e0 100644 --- a/src/support/import_ssh_hosts.rs +++ b/src/support/import_ssh_hosts.rs @@ -1,3 +1,8 @@ +//! ## Import SSH Hosts +//! +//! Imports OpenSSH host entries into termscp bookmarks and optionally registers +//! referenced private keys in the configured SSH key storage. + use std::fs::File; use std::io::BufReader; use std::path::PathBuf; diff --git a/src/utils/ssh.rs b/src/utils/ssh.rs index 953536d..775aaa4 100644 --- a/src/utils/ssh.rs +++ b/src/utils/ssh.rs @@ -1,5 +1,11 @@ +//! ## SSH Utilities +//! +//! Provides small helpers for loading SSH configuration files used by bookmarks +//! and setup flows. + use ssh2_config::{ParseRule, SshConfig}; +/// Parses an OpenSSH-style config file into an `ssh2_config::SshConfig`. pub fn parse_ssh2_config(path: &str) -> Result { use std::fs::File; use std::io::BufReader;