pub enum AnkiError {
AnkiConnectError(AnkiConnectError),
HttpError(Error),
JsonError(String),
InvalidField {
field_name: String,
model_name: String,
},
ValidationError(String),
UnknownError(String),
}
Expand description
Main error type for the ankiconnect-rs crate
Variants§
AnkiConnectError(AnkiConnectError)
Error from the AnkiConnect API
HttpError(Error)
HTTP request error
JsonError(String)
JSON parsing error
InvalidField
Invalid field for the given model
ValidationError(String)
Validation error
UnknownError(String)
Trait Implementations§
Source§impl Error for AnkiError
impl Error for AnkiError
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<AnkiConnectError> for AnkiError
impl From<AnkiConnectError> for AnkiError
Source§fn from(source: AnkiConnectError) -> Self
fn from(source: AnkiConnectError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AnkiError
impl !RefUnwindSafe for AnkiError
impl Send for AnkiError
impl Sync for AnkiError
impl Unpin for AnkiError
impl !UnwindSafe for AnkiError
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