ankiconnect 0.2.0

A Rust library for interacting with AnkiConnect.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

use crate::{AnkiRequestable, NoteId};

#[derive(Debug, Serialize)]
pub struct FindNotesRequest {
    pub query: String,
}

#[derive(Debug, Deserialize)]
pub struct FindNotesResponse(pub Vec<NoteId>);

impl AnkiRequestable for FindNotesRequest {
    type Response = FindNotesResponse;

    const ACTION: &'static str = "findNotes";
    const VERSION: u16 = 6;
}