Skip to main content

Module import

Module import 

Source
Expand description

Bulk import operations with duplicate handling.

This module provides high-level import workflows that combine validation, duplicate detection, and batch operations.

§Example

use ankit_engine::{Engine, NoteBuilder};
use ankit_engine::import::OnDuplicate;

let engine = Engine::new();

let notes = vec![
    NoteBuilder::new("Japanese", "Basic")
        .field("Front", "hello")
        .field("Back", "world")
        .build(),
];

let report = engine.import().notes(&notes, OnDuplicate::Skip).await?;
println!("Added: {}, Skipped: {}", report.added, report.skipped);

Structs§

ImportEngine
Import workflow engine.
ImportFailure
Details about a failed import.
ImportReport
Report of an import operation.
SmartAddOptions
Options for smart add operation.
SmartAddResult
Result of a smart add operation.
ValidationResult
Result of validating a single note.

Enums§

OnDuplicate
Strategy for handling duplicate notes during import.
SmartAddStatus
Status of a smart add operation.