pub enum Error {
ClosureError(Box<dyn Error>),
ReqwestError(Error),
SerdeJsonError(Error),
JsonRpcError(JsonRpcError),
UidParseError(String),
}
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
ReqwestError(Error)
An error from the reqwest
library
See reqwest::Error
for more information.
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
UidParseError(String)
An error occured while parsing the uid
field from the authenticate
response
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<AuthenticationError> for Error
impl From<AuthenticationError> for Error
Source§fn from(value: AuthenticationError) -> Self
fn from(value: AuthenticationError) -> Self
Converts to this type from the input type.
Source§impl From<ClosureAuthError> for Error
impl From<ClosureAuthError> for Error
Source§fn from(value: ClosureAuthError) -> Self
fn from(value: ClosureAuthError) -> 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<JsonRpcError> for Error
impl From<JsonRpcError> for Error
Source§fn from(source: JsonRpcError) -> Self
fn from(source: JsonRpcError) -> Self
Converts to this type from the input type.
Source§impl From<ParseResponseError> for Error
impl From<ParseResponseError> for Error
Source§fn from(value: ParseResponseError) -> Self
fn from(value: ParseResponseError) -> Self
Converts to this type from the input type.
Source§impl From<ReqwestAuthError> for Error
impl From<ReqwestAuthError> for Error
Source§fn from(value: ReqwestAuthError) -> Self
fn from(value: ReqwestAuthError) -> Self
Converts to this type from the input type.
Source§impl From<ReqwestError> for Error
impl From<ReqwestError> for Error
Source§fn from(value: ReqwestError) -> Self
fn from(value: ReqwestError) -> 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