Enum bonsaidb::core::transmog_pot::pot::Error
pub enum Error {
Show 16 variants
NotAPot,
IncompatibleVersion,
Message(String),
TrailingBytes,
Eof,
ImpreciseCastWouldLoseData,
Io(Error),
SequenceSizeMustBeKnown,
InvalidUtf8(String),
InvalidKind(u8),
UnexpectedKind(Kind, Kind),
UnknownSymbol(u64),
UnsupportedByteCount(Kind, usize),
InvalidAtomHeader,
TooManyBytesRead,
UnknownSpecial(UnknownSpecial),
}
Expand description
All errors that Pot may return.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotAPot
Payload is not a Pot payload.
IncompatibleVersion
Data was written with an incompatible version.
Message(String)
A generic error occurred.
TrailingBytes
Extra data appeared at the end of the input.
Eof
Expected more data but encountered the end of the input.
ImpreciseCastWouldLoseData
A numerical value could not be handled without losing precision or truncation.
Io(Error)
An IO error occurred.
SequenceSizeMustBeKnown
A sequence of unknown size cannot be serialized.
InvalidUtf8(String)
String data contained invalid UTF-8 characters.
InvalidKind(u8)
An unknown kind was encountered. Generally a sign that something else has been parsed incorrectly.
UnexpectedKind(Kind, Kind)
Encountered an unexpected atom kind.
UnknownSymbol(u64)
A requested symbol id was not found.
UnsupportedByteCount(Kind, usize)
An unsupported byte count for a numeric type was encountered.
InvalidAtomHeader
An atom header was incorrectly formatted.
TooManyBytesRead
The amount of data read exceeds the configured maximum number of bytes.
UnknownSpecial(UnknownSpecial)
An unknown Special
was encountered.
Trait Implementations§
§impl Error for Error
impl Error for Error
1.30.0 · 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
§impl Error for Error
impl Error for Error
§fn custom<T>(msg: T) -> Errorwhere
T: Display,
fn custom<T>(msg: T) -> Errorwhere T: Display,
source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize
receives a type different from what it was
expecting. Read moresource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize
receives a value of the right type but that
is wrong for some other reason. Read moresource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Deserialize
enum type received a variant with an
unrecognized name.source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Deserialize
struct type received a field with an
unrecognized name.source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Deserialize
struct type expected to receive a required
field with a particular name but that field was not present in the
input.source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Deserialize
struct type received more than one of the
same field.