#[non_exhaustive]pub enum ServerCheckMethod {
NoCheck,
PublicKey(String),
PublicKeyFile(String),
DefaultKnownHostsFile,
KnownHostsFile(String),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoCheck
PublicKey(String)
base64 encoded key without the type prefix or hostname suffix (type is already encoded)
PublicKeyFile(String)
DefaultKnownHostsFile
KnownHostsFile(String)
Implementations§
Source§impl ServerCheckMethod
impl ServerCheckMethod
Sourcepub fn with_public_key(key: &str) -> Self
pub fn with_public_key(key: &str) -> Self
Convenience method to create a ServerCheckMethod
from a string literal.
Sourcepub fn with_public_key_file(key_file_name: &str) -> Self
pub fn with_public_key_file(key_file_name: &str) -> Self
Convenience method to create a ServerCheckMethod
from a string literal.
Sourcepub fn with_known_hosts_file(known_hosts_file: &str) -> Self
pub fn with_known_hosts_file(known_hosts_file: &str) -> Self
Convenience method to create a ServerCheckMethod
from a string literal.
Trait Implementations§
Source§impl Clone for ServerCheckMethod
impl Clone for ServerCheckMethod
Source§fn clone(&self) -> ServerCheckMethod
fn clone(&self) -> ServerCheckMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ServerCheckMethod
impl Debug for ServerCheckMethod
Source§impl Hash for ServerCheckMethod
impl Hash for ServerCheckMethod
Source§impl PartialEq for ServerCheckMethod
impl PartialEq for ServerCheckMethod
impl Eq for ServerCheckMethod
impl StructuralPartialEq for ServerCheckMethod
Auto Trait Implementations§
impl Freeze for ServerCheckMethod
impl RefUnwindSafe for ServerCheckMethod
impl Send for ServerCheckMethod
impl Sync for ServerCheckMethod
impl Unpin for ServerCheckMethod
impl UnwindSafe for ServerCheckMethod
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