pub enum Error {
Show 30 variants
CouldNotReadKey,
UnsupportedKeyType {
key_type_string: String,
key_type_raw: Vec<u8>,
},
Ed25519KeyError(SignatureError),
EcdsaKeyError(Error),
KeyIsEncrypted,
KeyIsCorrupt,
NoHomeDir,
KeyChanged {
line: usize,
},
UnknownAlgorithm(ObjectIdentifier),
IndexOutOfBounds,
UnknownSignatureType {
sig_type: String,
},
InvalidSignature,
InvalidParameters,
AgentProtocolError,
AgentFailure,
IO(Error),
Rsa(Error),
Pad(PadError),
Unpad(UnpadError),
Decode(DecodeError),
Der(Error),
Spki(Error),
Pkcs1(Error),
Pkcs8(Error),
Sec1(Error),
SshKey(Error),
SshEncoding(Error),
EnvVar(&'static str),
BadAuthSock,
Utf8(FromUtf8Error),
}Variants§
CouldNotReadKey
The key could not be read, for an unknown reason
UnsupportedKeyType
The type of the key is unsupported
Ed25519KeyError(SignatureError)
The type of the key is unsupported
EcdsaKeyError(Error)
The type of the key is unsupported
KeyIsEncrypted
The key is encrypted (should supply a password?)
KeyIsCorrupt
The key contents are inconsistent
NoHomeDir
Home directory could not be found
KeyChanged
The server key has changed
UnknownAlgorithm(ObjectIdentifier)
The key uses an unsupported algorithm
IndexOutOfBounds
Index out of bounds
UnknownSignatureType
Unknown signature type
InvalidSignature
InvalidParameters
AgentProtocolError
Agent protocol error
AgentFailure
IO(Error)
Rsa(Error)
Pad(PadError)
Unpad(UnpadError)
Decode(DecodeError)
Der(Error)
Spki(Error)
Pkcs1(Error)
Pkcs8(Error)
Sec1(Error)
SshKey(Error)
SshEncoding(Error)
EnvVar(&'static str)
BadAuthSock
Utf8(FromUtf8Error)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<UnpadError> for Error
impl From<UnpadError> for Error
Source§fn from(source: UnpadError) -> Self
fn from(source: UnpadError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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