#[non_exhaustive]pub enum ErrorProblem {
Show 23 variants
EmptyDocument,
WrongDocumentType,
MultipleDocuments,
MissingObject,
ItemRepeated,
ItemForbidden,
ItemMisplacedAfterSignature,
NulByte,
KeywordLineStartsWithWhitespace,
MissingKeyword,
InvalidKeyword(InvalidKeyword),
MissingItem {
keyword: &'static str,
},
MissingArgument {
field: &'static str,
},
InvalidArgument {
field: &'static str,
},
UnexpectedArgument,
ObjectMissingFooter,
ObjectMismatchedLabels,
ObjectIncorrectLabel,
InvalidObjectDelimiters,
ObjectUnexpected,
ObjectInvalidBase64,
ObjectInvalidData,
Other(&'static str),
}
parse2
only.Expand description
Problem found when parsing a document
Just the nature of the problem, including possibly which field or argument if that’s necessary to disambiguate, but not including location in the document.
We are quite minimal:
we do not report the Display
of argument parse errors, for example.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyDocument
Empty document
WrongDocumentType
Wrong document type
MultipleDocuments
Multiple top-level documents
MissingObject
Item missing required base64-encoded Object
ItemRepeated
Item repeated when not allowed
ItemForbidden
Item forbidden (in this kind of document or location)
ItemMisplacedAfterSignature
Item repeated when not allowed
NulByte
Document contains nul byte
KeywordLineStartsWithWhitespace
Item keyword line starts with whitespace
MissingKeyword
No keyword when item keyword line expected
InvalidKeyword(InvalidKeyword)
No keyword when item keyword line expected
MissingItem
Missing item {keyword}
MissingArgument
Missing argument {field}
InvalidArgument
Invalid value for argument {field}
UnexpectedArgument
Unexpected additional argument(s)
Base64-encoded Object footer not found
ObjectMismatchedLabels
Base64-encoded Object END label does not match BEGIN
ObjectIncorrectLabel
Base64-encoded Object END label does not match BEGIN
InvalidObjectDelimiters
Base64-encoded Object has incorrectly formatted delimiter lines
ObjectUnexpected
Base64-encoded Object found where none expected
ObjectInvalidBase64
Base64-encoded Object contains invalid base64
ObjectInvalidData
Base64-encoded Object contains valid base64 specifying invalid data
Other(&'static str)
Other parsing proble
Trait Implementations§
Source§impl Clone for ErrorProblem
impl Clone for ErrorProblem
Source§fn clone(&self) -> ErrorProblem
fn clone(&self) -> ErrorProblem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ErrorProblem
impl Debug for ErrorProblem
Source§impl Display for ErrorProblem
impl Display for ErrorProblem
Source§impl Error for ErrorProblem
impl Error for ErrorProblem
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<InvalidKeyword> for ErrorProblem
impl From<InvalidKeyword> for ErrorProblem
Source§fn from(source: InvalidKeyword) -> Self
fn from(source: InvalidKeyword) -> Self
Source§impl PartialEq for ErrorProblem
impl PartialEq for ErrorProblem
impl Copy for ErrorProblem
impl Eq for ErrorProblem
impl StructuralPartialEq for ErrorProblem
Auto Trait Implementations§
impl Freeze for ErrorProblem
impl RefUnwindSafe for ErrorProblem
impl Send for ErrorProblem
impl Sync for ErrorProblem
impl Unpin for ErrorProblem
impl UnwindSafe for ErrorProblem
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<E> ErrorReport for Ewhere
E: Error + 'static,
impl<E> ErrorReport for Ewhere
E: Error + 'static,
Source§fn report(&self) -> Report<ReportHelper<'_>>
fn report(&self) -> Report<ReportHelper<'_>>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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