pub enum Error {
Bson(BsonException),
EndOfStream,
InvalidOperation(String),
InvalidCast(String),
KeyNotFound(String),
Argument(String),
Overflow(String),
Format(String),
NullReference,
Io(Arc<Error>),
Handler(String),
}Expand description
What a serializer, a resolver or a transport reports. Each variant is the exception of the same name in the upstream code.
Variants§
Bson(BsonException)
BsonException: what the BSON serializer itself rejects.
EndOfStream
EndOfStreamException: the document or the stream ended inside a
value.
InvalidOperation(String)
InvalidOperationException.
InvalidCast(String)
InvalidCastException: a deserialized value is not of the type of
the property it belongs to.
KeyNotFound(String)
KeyNotFoundException: an identifier or a type the resolver does not
know, or an element type the reader has no type for.
Argument(String)
ArgumentException and ArgumentOutOfRangeException.
Overflow(String)
OverflowException.
Format(String)
FormatException.
NullReference
NullReferenceException.
Io(Arc<Error>)
IOException and SocketException: what a stream or a socket
reported.
Handler(String)
A handler of an event panicked: the port’s form of an exception thrown by a handler, with the message of the panic.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()