pub enum ParsingError {
EmptyStream,
StreamTooShort(MatterPart),
UnknownMatterCode(String),
MalformedCode {
part: MatterPart,
found: String,
},
InvalidVariableSizeLead(char),
MismatchedSizingLogic(String),
Conversion(Error),
InvalidUtf8(Utf8Error),
Base64(DecodeError),
}Available on crate feature
core only.Expand description
Errors produced while parsing a CESR Matter stream.
Variants§
EmptyStream
The input stream is empty.
StreamTooShort(MatterPart)
The stream ended before enough bytes were available to parse the given part.
UnknownMatterCode(String)
The code prefix does not match any known Matter code.
MalformedCode
A structural component of the code was malformed.
Fields
§
part: MatterPartWhich structural part was malformed.
InvalidVariableSizeLead(char)
The variable-size lead character is not a valid CESR lead byte.
MismatchedSizingLogic(String)
Variable-length logic was applied to a fixed-size code.
Conversion(Error)
A low-level Base64 conversion error occurred.
InvalidUtf8(Utf8Error)
An invalid UTF-8 sequence was encountered during parsing.
Base64(DecodeError)
Base64 decoding failed.
Trait Implementations§
Source§impl Debug for ParsingError
impl Debug for ParsingError
Source§impl Display for ParsingError
impl Display for ParsingError
impl Eq for ParsingError
Source§impl Error for ParsingError
impl Error for ParsingError
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 ParsingError
impl From<DecodeError> for ParsingError
Source§fn from(e: DecodeError) -> Self
fn from(e: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ParsingError
impl From<Error> for ParsingError
Source§fn from(source: CesrUtilError) -> Self
fn from(source: CesrUtilError) -> Self
Converts to this type from the input type.
Source§impl From<ParsingError> for MatterBuildError
impl From<ParsingError> for MatterBuildError
Source§fn from(source: ParsingError) -> Self
fn from(source: ParsingError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for ParsingError
impl From<Utf8Error> for ParsingError
Source§impl PartialEq for ParsingError
impl PartialEq for ParsingError
impl StructuralPartialEq for ParsingError
Auto Trait Implementations§
impl Freeze for ParsingError
impl RefUnwindSafe for ParsingError
impl Send for ParsingError
impl Sync for ParsingError
impl Unpin for ParsingError
impl UnsafeUnpin for ParsingError
impl UnwindSafe for ParsingError
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