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;

#[derive(Debug, Serialize)]
pub struct ImportPackageRequest {
    pub path: String,
}

#[derive(Debug, Deserialize)]
pub struct ImportPackageResponse(pub bool);

impl AnkiRequestable for ImportPackageRequest {
    type Response = ImportPackageResponse;

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