pub enum PemError {
InputTooLarge,
DerTooLarge,
MissingBegin,
MissingEnd,
LabelMismatch,
UnsupportedLabel,
InvalidBoundary,
InvalidBase64,
InvalidBody,
InvalidOptions,
}Expand description
Error returned when PEM text armor cannot be parsed or encoded.
Variants§
InputTooLarge
The input text exceeded the configured maximum size.
DerTooLarge
The decoded DER body exceeded the configured maximum size.
MissingBegin
The PEM document did not contain a BEGIN boundary.
MissingEnd
The PEM document did not contain a matching END boundary.
LabelMismatch
The BEGIN and END labels did not match.
UnsupportedLabel
The label is not part of the configured allowlist.
InvalidBoundary
A boundary line was malformed.
InvalidBase64
The base64 body was malformed.
InvalidBody
The body was empty or contained invalid armor data.
InvalidOptions
The encode options were invalid.
Trait Implementations§
impl Copy for PemError
impl Eq for PemError
Source§impl Error for PemError
impl Error for PemError
1.30.0 · 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()
impl StructuralPartialEq for PemError
Auto Trait Implementations§
impl Freeze for PemError
impl RefUnwindSafe for PemError
impl Send for PemError
impl Sync for PemError
impl Unpin for PemError
impl UnsafeUnpin for PemError
impl UnwindSafe for PemError
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