pub enum KnownHosts {
NotFound,
Unknown,
Ok,
Changed,
Other,
}
Expand description
Indicates the state of known-host matching, an important set to detect and avoid MITM attacks.
Variants§
NotFound
The known host file does not exist. The host is thus unknown. File will be created if host key is accepted.
Unknown
The server is unknown. User should confirm the public key hash is correct.
Ok
The server is known and has not changed.
Changed
The server key has changed. Either you are under attack or the administrator changed the key. You HAVE to warn the user about a possible attack.
Other
The server gave use a key of a type while we had an other type recorded. It is a possible attack.
Trait Implementations§
Source§impl Clone for KnownHosts
impl Clone for KnownHosts
Source§fn clone(&self) -> KnownHosts
fn clone(&self) -> KnownHosts
Returns a copy of the value. Read more
1.0.0 · 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 KnownHosts
impl Debug for KnownHosts
Source§impl PartialEq for KnownHosts
impl PartialEq for KnownHosts
impl Copy for KnownHosts
impl Eq for KnownHosts
impl StructuralPartialEq for KnownHosts
Auto Trait Implementations§
impl Freeze for KnownHosts
impl RefUnwindSafe for KnownHosts
impl Send for KnownHosts
impl Sync for KnownHosts
impl Unpin for KnownHosts
impl UnwindSafe for KnownHosts
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