Skip to main content

ResolvedSshConfig

Struct ResolvedSshConfig 

Source
pub struct ResolvedSshConfig {
Show 18 fields pub hostname: Option<String>, pub user: Option<String>, pub port: Option<u16>, pub identity_files: Vec<PathBuf>, pub identities_only: Option<bool>, pub identity_agent: Option<PathBuf>, pub certificate_files: Vec<PathBuf>, pub proxy_command: Option<String>, pub proxy_jump: Option<String>, pub user_known_hosts_files: Vec<PathBuf>, pub strict_host_key_checking: Option<StrictHostKeyChecking>, pub host_key_algorithms: Option<AlgList>, pub kex_algorithms: Option<AlgList>, pub ciphers: Option<AlgList>, pub macs: Option<AlgList>, pub connect_timeout: Option<Duration>, pub connection_attempts: Option<u32>, pub provenance: Vec<DirectiveSource>,
}
Expand description

Fully-resolved ssh_config for one host.

Every field is optional or a vector — the resolver applies Some(_) or appends only when it sees a directive whose keyword maps onto the field; otherwise the field stays at its Default value.

“First occurrence wins” applies to all single-valued fields per ssh_config(5). Multi-valued fields (identity_files, certificate_files, user_known_hosts_files) accumulate every occurrence in source order, again matching OpenSSH.

Fields§

§hostname: Option<String>

HostName — the real hostname to connect to (may differ from the alias the user typed).

§user: Option<String>

User — login name on the remote.

§port: Option<u16>

Port — TCP port.

§identity_files: Vec<PathBuf>

IdentityFile — every IdentityFile directive contributes one entry here, in source order.

§identities_only: Option<bool>

IdentitiesOnly — when true, restrict authentication to keys listed in identity_files (no agent-supplied keys).

§identity_agent: Option<PathBuf>

IdentityAgent — path to a non-default agent socket.

§certificate_files: Vec<PathBuf>

CertificateFile — every entry contributes one path, in source order.

§proxy_command: Option<String>

ProxyCommand — captured raw (joined with single spaces); M13 parses and spawns it. The literal value "none" (lower-cased) is the FR-59 disable sentinel: it is preserved here so that the first-occurrence-wins rule shields it from a later wildcard override, and so gitway config show mirrors ssh -G’s output; the spawn path treats Some("none") as “no proxy”.

§proxy_jump: Option<String>

ProxyJump — captured raw; M13 parses the chain.

§user_known_hosts_files: Vec<PathBuf>

UserKnownHostsFile — every entry contributes one path.

§strict_host_key_checking: Option<StrictHostKeyChecking>

StrictHostKeyChecking.

§host_key_algorithms: Option<AlgList>

HostKeyAlgorithms — raw spec; M17 plumbs through to russh.

§kex_algorithms: Option<AlgList>

KexAlgorithms — raw spec; M17 plumbs through.

§ciphers: Option<AlgList>

Ciphers — raw spec; M17 plumbs through.

§macs: Option<AlgList>

MACs — raw spec; M17 plumbs through.

§connect_timeout: Option<Duration>

ConnectTimeout — measured in seconds in the source file, stored here as a Duration.

§connection_attempts: Option<u32>

ConnectionAttempts.

§provenance: Vec<DirectiveSource>

One DirectiveSource entry per directive that contributed to a known field, in the order applied. Preserves provenance for gitway config show and the config_source= diag-line field.

Trait Implementations§

Source§

impl Clone for ResolvedSshConfig

Source§

fn clone(&self) -> ResolvedSshConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedSshConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ResolvedSshConfig

Source§

fn default() -> ResolvedSshConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more