Expand description
Configuration builder for an AnvilSession.
§0.3.0 API break
Two fields changed shape in 0.3.0 to align with ssh_config(5):
identity_file: Option<PathBuf>->identity_files: Vec<PathBuf>. OpenSSH allows multipleIdentityFiledirectives; the resolver and the auth path now honour the full list in order. Reads of the old single-path getter still work via the#[deprecated]shim.skip_host_check: bool->strict_host_key_checking: StrictHostKeyChecking. The new enum encodesYes/No/AcceptNew, matchingssh_config(5). The old boolean getter and builder method continue to work via deprecation shims.
§Examples
use anvil_ssh::AnvilConfig;
use std::time::Duration;
// Connect to GitHub (default):
let config = AnvilConfig::github();
// Connect to GitLab:
let config = AnvilConfig::gitlab();
// Connect to Codeberg:
let config = AnvilConfig::codeberg();
// Connect to any host with a custom port:
let config = AnvilConfig::builder("git.example.com")
.port(22)
.username("git")
.inactivity_timeout(Duration::from_secs(60))
.build();Structs§
- Anvil
Config - Immutable configuration for an
AnvilSession. - Anvil
Config Builder - Builder for
AnvilConfig.