#[non_exhaustive]pub struct ClientConfig { /* private fields */ }Expand description
Client connection configuration.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn set_endpoint(&mut self, endpoint: impl Into<Endpoint>)
pub fn set_endpoint(&mut self, endpoint: impl Into<Endpoint>)
Sets the endpoint.
Sourcepub fn set_username(&mut self, username: impl Into<Username>)
pub fn set_username(&mut self, username: impl Into<Username>)
Sets the username.
Sourcepub fn credentials(&self) -> &[Credential]
pub fn credentials(&self) -> &[Credential]
Returns configured credentials in preference order.
Sourcepub fn add_credential(&mut self, credential: Credential)
pub fn add_credential(&mut self, credential: Credential)
Adds a credential.
Sourcepub fn set_timeouts(&mut self, timeouts: Timeouts)
pub fn set_timeouts(&mut self, timeouts: Timeouts)
Sets timeout settings.
Sourcepub fn set_keepalive(&mut self, keepalive: Keepalive)
pub fn set_keepalive(&mut self, keepalive: Keepalive)
Sets keepalive settings.
Sourcepub fn strict_host_key_checking(&self) -> bool
pub fn strict_host_key_checking(&self) -> bool
Returns whether strict host key checking is enabled.
Sourcepub fn set_strict_host_key_checking(&mut self, enabled: bool)
👎Deprecated: use set_host_key_policy instead
pub fn set_strict_host_key_checking(&mut self, enabled: bool)
use set_host_key_policy instead
Sets strict host key checking.
Sourcepub fn host_key_policy(&self) -> &HostKeyPolicy
pub fn host_key_policy(&self) -> &HostKeyPolicy
Returns the configured host-key policy.
Sourcepub fn set_host_key_policy(&mut self, policy: HostKeyPolicy)
pub fn set_host_key_policy(&mut self, policy: HostKeyPolicy)
Sets the host-key policy.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 ClientConfig
impl Debug for ClientConfig
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§impl PartialEq for ClientConfig
impl PartialEq for ClientConfig
Source§fn eq(&self, other: &ClientConfig) -> bool
fn eq(&self, other: &ClientConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl !RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl !UnwindSafe for ClientConfig
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