pub enum Error {
Show 35 variants
ValidateString(ValidationError),
EncodeString(EncodingError),
DecodeString(DecodingError),
ValidateBoolean(ValidationError),
EncodeBoolean(EncodingError),
DecodeBoolean(DecodingError),
ValidateNumber(ValidationError),
EncodeNumber(EncodingError),
DecodeNumber(DecodingError),
ValidateInteger(ValidationError),
EncodeInteger(EncodingError),
DecodeInteger(DecodingError),
ValidateObject(ValidationError),
EncodeObject(EncodingError),
DecodeObject(DecodingError),
ValidateArray(ValidationError),
EncodeArray(EncodingError),
DecodeArray(DecodingError),
Serialization(Error),
IoFail(Error),
InvalidString(FromUtf8Error),
InvalidBString(FromUtf8Error),
BinaryEncoding(FromHexError),
StringEncoding {
value: String,
source: EncodingError,
},
InvalidValue {
value: String,
type_: &'static str,
},
InvalidDefaultChar(char),
NotAField(String),
NotAnObject(String),
MissingArrayLength,
NotMatchFixedLength {
value: String,
len: usize,
fixed: usize,
},
ExceededLengthEncoding {
value: String,
len: usize,
max: usize,
},
InconsitentFixedLength,
EncodedValueExceedsCapacity {
len: usize,
cap: usize,
},
InvalidDefault {
value: String,
type_: &'static str,
source: Box<Error>,
},
InvalidConstValue {
expected: String,
got: String,
},
}
Expand description
Errors from binary serialization.
Variants§
ValidateString(ValidationError)
EncodeString(EncodingError)
DecodeString(DecodingError)
ValidateBoolean(ValidationError)
EncodeBoolean(EncodingError)
DecodeBoolean(DecodingError)
ValidateNumber(ValidationError)
EncodeNumber(EncodingError)
DecodeNumber(DecodingError)
ValidateInteger(ValidationError)
EncodeInteger(EncodingError)
DecodeInteger(DecodingError)
ValidateObject(ValidationError)
EncodeObject(EncodingError)
DecodeObject(DecodingError)
ValidateArray(ValidationError)
EncodeArray(EncodingError)
DecodeArray(DecodingError)
Serialization(Error)
IoFail(Error)
InvalidString(FromUtf8Error)
InvalidBString(FromUtf8Error)
BinaryEncoding(FromHexError)
StringEncoding
InvalidValue
InvalidDefaultChar(char)
NotAField(String)
NotAnObject(String)
MissingArrayLength
NotMatchFixedLength
ExceededLengthEncoding
InconsitentFixedLength
EncodedValueExceedsCapacity
InvalidDefault
InvalidConstValue
Implementations§
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<DecodingError> for Error
impl From<DecodingError> for Error
Source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<DecodingError> for Error
impl From<DecodingError> for Error
Source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<DecodingError> for Error
impl From<DecodingError> for Error
Source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<DecodingError> for Error
impl From<DecodingError> for Error
Source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<DecodingError> for Error
impl From<DecodingError> for Error
Source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<DecodingError> for Error
impl From<DecodingError> for Error
Source§fn from(source: DecodingError) -> Self
fn from(source: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DecodingError
impl From<Error> for DecodingError
Source§impl From<Error> for DecodingError
impl From<Error> for DecodingError
Source§impl From<Error> for EncodingError
impl From<Error> for EncodingError
Source§impl From<Error> for EncodingError
impl From<Error> for EncodingError
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<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<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> 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