pub enum Error {
Show 17 variants
InvalidSize {
data_type: String,
expected: usize,
actual: usize,
},
InvalidData {
data_type: String,
reason: String,
},
DataTooShort {
data_type: String,
minimum: usize,
actual: usize,
},
Crypto(String),
Cbor(Error),
Sskr(Error),
Ssh(String),
Uri(ParseError),
Compression(String),
PostQuantum(String),
LevelMismatch,
SshAgent(String),
Hex(FromHexError),
Utf8(FromUtf8Error),
Env(VarError),
SshAgentClient(String),
General(String),
}
Variants§
InvalidSize
Invalid data size for the specified type.
InvalidData
Invalid data format or content.
DataTooShort
Crypto(String)
Cryptographic operation failed.
Cbor(Error)
CBOR encoding or decoding error.
Sskr(Error)
SSKR error.
Ssh(String)
SSH key operation failed.
Uri(ParseError)
URI parsing failed.
Compression(String)
Data compression/decompression failed.
PostQuantum(String)
Post-quantum cryptography library error.
LevelMismatch
Signature level mismatch.
SshAgent(String)
SSH agent operation failed.
Hex(FromHexError)
Hex decoding error.
Utf8(FromUtf8Error)
UTF-8 conversion error.
Env(VarError)
Environment variable error.
SshAgentClient(String)
SSH agent client error.
General(String)
General error with custom message.
Implementations§
Source§impl Error
impl Error
Sourcepub fn invalid_size(
data_type: impl Into<String>,
expected: usize,
actual: usize,
) -> Self
pub fn invalid_size( data_type: impl Into<String>, expected: usize, actual: usize, ) -> Self
Create an invalid size error.
Sourcepub fn invalid_data(
data_type: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_data( data_type: impl Into<String>, reason: impl Into<String>, ) -> Self
Create an invalid data error.
Sourcepub fn data_too_short(
data_type: impl Into<String>,
minimum: usize,
actual: usize,
) -> Self
pub fn data_too_short( data_type: impl Into<String>, minimum: usize, actual: usize, ) -> Self
Create a data too short error.
Sourcepub fn compression(msg: impl Into<String>) -> Self
pub fn compression(msg: impl Into<String>) -> Self
Create a compression error.
Sourcepub fn post_quantum(msg: impl Into<String>) -> Self
pub fn post_quantum(msg: impl Into<String>) -> Self
Create a post-quantum cryptography error.
Sourcepub fn ssh_agent_client(msg: impl Into<String>) -> Self
pub fn ssh_agent_client(msg: impl Into<String>) -> Self
Create an SSH agent client error.
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<FromHexError> for Error
impl From<FromHexError> for Error
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> 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<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> 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