pub enum LoadError {
Show 15 variants
Pem {
inner: Error,
},
Rsa {
inner: Error,
},
Pkcs1 {
inner: Error,
},
Pkcs8 {
inner: Error,
},
Der {
inner: Error,
},
Spki {
inner: Error,
},
UnknownEllipticCurveOid {
oid: ObjectIdentifier,
},
UnknownAlgorithmOid {
oid: ObjectIdentifier,
},
UnsupportedPemLabel {
label: String,
},
MissingSec1Parameters,
MissingSec1CurveName,
Encrypted,
Unencrypted,
UnsupportedFormat,
InEncrypted {
inner: Box<LoadError>,
},
}Expand description
Error type used when a key could not be loaded
Variants§
Pem
Rsa
Pkcs1
Pkcs8
Der
Spki
UnknownEllipticCurveOid
Fields
§
oid: ObjectIdentifierUnknownAlgorithmOid
Fields
§
oid: ObjectIdentifierUnsupportedPemLabel
MissingSec1Parameters
MissingSec1CurveName
Encrypted
Unencrypted
UnsupportedFormat
InEncrypted
Implementations§
Source§impl LoadError
impl LoadError
Sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Returns true if the load error is Encrypted.
Sourcepub fn is_unencrypted(&self) -> bool
pub fn is_unencrypted(&self) -> bool
Returns true if the load error is Unencrypted.
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
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()
Auto Trait Implementations§
impl Freeze for LoadError
impl RefUnwindSafe for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
impl UnwindSafe for LoadError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more