pub enum ClosureError {
ClosureError(Box<dyn Error>),
SerdeJsonError(Error),
JsonRpcError(JsonRpcError),
}
Expand description
An error sending a closure-based OdooRequest
Variants§
ClosureError(Box<dyn Error>)
An error occured inside the custom closure
We include a blanket from Box<dyn Error> here because the concrete error
type cannot be known here (i.e., only the crate consumer will know the
type). This allows fallible()?
to correctly return the ClosureError type
SerdeJsonError(Error)
A parsing error from the serde_json library
This might be raised if the returned JSON data is invalid, or couldn’t
be parsed into the XxxResponse
struct properly.
JsonRpcError(JsonRpcError)
The Odoo API request was not successful
See JsonRpcError
for more details
Trait Implementations§
Source§impl Debug for ClosureError
impl Debug for ClosureError
Source§impl Display for ClosureError
impl Display for ClosureError
Source§impl Error for ClosureError
impl Error for ClosureError
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<ClosureError> for ClosureAuthError
impl From<ClosureError> for ClosureAuthError
Source§fn from(source: ClosureError) -> Self
fn from(source: ClosureError) -> Self
Converts to this type from the input type.
Source§impl From<ClosureError> for Error
impl From<ClosureError> for Error
Source§fn from(value: ClosureError) -> Self
fn from(value: ClosureError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ClosureError
impl From<Error> for ClosureError
Source§impl From<JsonRpcError> for ClosureError
impl From<JsonRpcError> for ClosureError
Source§fn from(source: JsonRpcError) -> Self
fn from(source: JsonRpcError) -> Self
Converts to this type from the input type.
Source§impl From<ParseResponseError> for ClosureError
impl From<ParseResponseError> for ClosureError
Source§fn from(value: ParseResponseError) -> Self
fn from(value: ParseResponseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClosureError
impl !RefUnwindSafe for ClosureError
impl !Send for ClosureError
impl !Sync for ClosureError
impl Unpin for ClosureError
impl !UnwindSafe for ClosureError
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