pub enum Error {
Show 17 variants
Tarantool(TarantoolError),
IO(Error),
Encode(Encode),
Decode {
error: Error,
expected_type: String,
actual_msgpack: Vec<u8>,
},
DecodeRmpValue(Error),
Unicode(Utf8Error),
NumValueRead(NumValueReadError),
ValueRead(ValueReadError),
ValueWrite(ValueWriteError),
Remote(ResponseError),
Protocol(Arc<Error>),
Tcp(Arc<Error>),
LuaError(LuaError),
MetaNotFound,
MsgpackEncode(EncodeError),
MsgpackDecode(DecodeError),
Other(Box<dyn Error + Send + Sync>),
}
Expand description
Represents all error cases for all routines of crate (including Tarantool errors)
Variants§
Tarantool(TarantoolError)
IO(Error)
Encode(Encode)
Decode
DecodeRmpValue(Error)
Unicode(Utf8Error)
NumValueRead(NumValueReadError)
ValueRead(ValueReadError)
ValueWrite(ValueWriteError)
Remote(ResponseError)
Protocol(Arc<Error>)
The error is wrapped in a Arc
, because some libraries require
error types to implement Sync
, which isn’t implemented for Rc
.
Tcp(Arc<Error>)
The error is wrapped in a Arc
, because some libraries require
error types to implement Sync
, which isn’t implemented for Rc
.
LuaError(LuaError)
MetaNotFound
MsgpackEncode(EncodeError)
MsgpackDecode(DecodeError)
Other(Box<dyn Error + Send + Sync>)
This should only be used if the error doesn’t fall into one of the above categories.
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)>
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<MarkerReadError> for Error
impl From<MarkerReadError> for Error
source§fn from(error: MarkerReadError) -> Self
fn from(error: MarkerReadError) -> Self
Converts to this type from the input type.
source§impl From<NumValueReadError> for Error
impl From<NumValueReadError> for Error
source§fn from(source: NumValueReadError) -> Self
fn from(source: NumValueReadError) -> Self
Converts to this type from the input type.
source§impl From<TarantoolError> for Error
impl From<TarantoolError> for Error
source§fn from(error: TarantoolError) -> Self
fn from(error: TarantoolError) -> Self
Converts to this type from the input type.
source§impl<E> From<TransactionError<E>> for Error
impl<E> From<TransactionError<E>> for Error
source§fn from(e: TransactionError<E>) -> Self
fn from(e: TransactionError<E>) -> Self
Converts to this type from the input type.
source§impl From<ValueReadError> for Error
impl From<ValueReadError> for Error
source§fn from(source: ValueReadError) -> Self
fn from(source: ValueReadError) -> Self
Converts to this type from the input type.
source§impl From<ValueWriteError> for Error
impl From<ValueWriteError> for Error
source§fn from(source: ValueWriteError) -> Self
fn from(source: ValueWriteError) -> 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