pub struct SshEndpoint { /* private fields */ }Expand description
Strict-host-key SSH connection material.
Implementations§
Source§impl SshEndpoint
impl SshEndpoint
Sourcepub fn new(host: impl Into<String>) -> Result<Self, TopologyError>
pub fn new(host: impl Into<String>) -> Result<Self, TopologyError>
Creates an SSH endpoint using port 22.
Sourcepub fn with_port(self, port: u16) -> Result<Self, TopologyError>
pub fn with_port(self, port: u16) -> Result<Self, TopologyError>
Sets the SSH port.
Sourcepub fn with_user(self, user: impl Into<String>) -> Result<Self, TopologyError>
pub fn with_user(self, user: impl Into<String>) -> Result<Self, TopologyError>
Sets the optional SSH user.
Sourcepub fn with_identity_file(
self,
path: impl Into<PathBuf>,
) -> Result<Self, TopologyError>
pub fn with_identity_file( self, path: impl Into<PathBuf>, ) -> Result<Self, TopologyError>
Sets an absolute identity-file path.
Sourcepub fn with_config_file(
self,
path: impl Into<PathBuf>,
) -> Result<Self, TopologyError>
pub fn with_config_file( self, path: impl Into<PathBuf>, ) -> Result<Self, TopologyError>
Sets an absolute SSH config path.
Sourcepub fn with_known_hosts_file(
self,
path: impl Into<PathBuf>,
) -> Result<Self, TopologyError>
pub fn with_known_hosts_file( self, path: impl Into<PathBuf>, ) -> Result<Self, TopologyError>
Sets an absolute known-hosts path used with strict verification.
Sourcepub fn identity_file(&self) -> Option<&Path>
pub fn identity_file(&self) -> Option<&Path>
Returns the optional identity-file path.
Sourcepub fn config_file(&self) -> Option<&Path>
pub fn config_file(&self) -> Option<&Path>
Returns the optional config-file path.
Sourcepub fn known_hosts_file(&self) -> Option<&Path>
pub fn known_hosts_file(&self) -> Option<&Path>
Returns the optional strict known-hosts path.
Trait Implementations§
Source§impl Clone for SshEndpoint
impl Clone for SshEndpoint
Source§fn clone(&self) -> SshEndpoint
fn clone(&self) -> SshEndpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SshEndpoint
impl Debug for SshEndpoint
Source§impl<'de> Deserialize<'de> for SshEndpoint
impl<'de> Deserialize<'de> for SshEndpoint
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
Source§impl PartialEq for SshEndpoint
impl PartialEq for SshEndpoint
Source§fn eq(&self, other: &SshEndpoint) -> bool
fn eq(&self, other: &SshEndpoint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SshEndpoint
impl Serialize for SshEndpoint
impl Eq for SshEndpoint
impl StructuralPartialEq for SshEndpoint
Auto Trait Implementations§
impl Freeze for SshEndpoint
impl RefUnwindSafe for SshEndpoint
impl Send for SshEndpoint
impl Sync for SshEndpoint
impl Unpin for SshEndpoint
impl UnsafeUnpin for SshEndpoint
impl UnwindSafe for SshEndpoint
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.