pub struct AnkiClient { /* private fields */ }Expand description
The main client for interacting with AnkiConnect.
§Example
use ankit::AnkiClient;
// Create a client with default settings
let client = AnkiClient::new();
// Check the AnkiConnect version
let version = client.misc().version().await?;
println!("AnkiConnect version: {}", version);Implementations§
Source§impl AnkiClient
impl AnkiClient
Sourcepub fn new() -> AnkiClient
pub fn new() -> AnkiClient
Create a new client with default settings.
Connects to http://127.0.0.1:8765 with a 30 second timeout.
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Create a builder for custom client configuration.
Sourcepub fn decks(&self) -> DeckActions<'_>
pub fn decks(&self) -> DeckActions<'_>
Access deck operations.
Sourcepub fn misc(&self) -> MiscActions<'_>
pub fn misc(&self) -> MiscActions<'_>
Access miscellaneous operations.
Sourcepub fn notes(&self) -> NoteActions<'_>
pub fn notes(&self) -> NoteActions<'_>
Access note operations.
Sourcepub fn cards(&self) -> CardActions<'_>
pub fn cards(&self) -> CardActions<'_>
Access card operations.
Sourcepub fn media(&self) -> MediaActions<'_>
pub fn media(&self) -> MediaActions<'_>
Access media operations.
Sourcepub fn models(&self) -> ModelActions<'_>
pub fn models(&self) -> ModelActions<'_>
Access model (note type) operations.
Sourcepub fn gui(&self) -> GuiActions<'_>
pub fn gui(&self) -> GuiActions<'_>
Access GUI operations.
Sourcepub fn statistics(&self) -> StatisticsActions<'_>
pub fn statistics(&self) -> StatisticsActions<'_>
Access statistics operations.
Trait Implementations§
Source§impl Clone for AnkiClient
impl Clone for AnkiClient
Source§fn clone(&self) -> AnkiClient
fn clone(&self) -> AnkiClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnkiClient
impl Debug for AnkiClient
Source§impl Default for AnkiClient
impl Default for AnkiClient
Source§fn default() -> AnkiClient
fn default() -> AnkiClient
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AnkiClient
impl !RefUnwindSafe for AnkiClient
impl Send for AnkiClient
impl Sync for AnkiClient
impl Unpin for AnkiClient
impl !UnwindSafe for AnkiClient
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