pub enum AnkiConnectError {
UnsupportedAction,
EmptyQuestion,
ModelNotFound(String),
DeckNotFound(String),
DuplicateNote,
EmptyNote,
MissingMediaField,
ModelNameExists,
InvalidColumnId(String),
InvalidCardOrder(String),
Other(String),
}
Expand description
Errors specific to the AnkiConnect API
Variants§
UnsupportedAction
The action is not supported by AnkiConnect
EmptyQuestion
Field values would make an empty question
ModelNotFound(String)
The specified model was not found
DeckNotFound(String)
The specified deck was not found
DuplicateNote
The note is a duplicate
EmptyNote
The note is empty
MissingMediaField
Missing media field (data, path, or URL)
ModelNameExists
A model with this name already exists
InvalidColumnId(String)
Invalid column ID
InvalidCardOrder(String)
Invalid card order
Other(String)
Other unspecified AnkiConnect error
Trait Implementations§
Source§impl Debug for AnkiConnectError
impl Debug for AnkiConnectError
Source§impl Display for AnkiConnectError
impl Display for AnkiConnectError
Source§impl Error for AnkiConnectError
impl Error for AnkiConnectError
1.30.0 · 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.
Source§impl From<AnkiConnectError> for NoteError
impl From<AnkiConnectError> for NoteError
Source§fn from(err: AnkiConnectError) -> Self
fn from(err: AnkiConnectError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AnkiConnectError
impl RefUnwindSafe for AnkiConnectError
impl Send for AnkiConnectError
impl Sync for AnkiConnectError
impl Unpin for AnkiConnectError
impl UnwindSafe for AnkiConnectError
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