pub struct OrganizeEngine<'a> { /* private fields */ }Expand description
Organization workflow engine.
Implementations§
Source§impl<'a> OrganizeEngine<'a>
impl<'a> OrganizeEngine<'a>
Sourcepub async fn clone_deck(
&self,
source: &str,
destination: &str,
) -> Result<CloneReport>
pub async fn clone_deck( &self, source: &str, destination: &str, ) -> Result<CloneReport>
Clone a deck with all its notes.
Creates a new deck with copies of all notes from the source deck. Scheduling information is not preserved (cards start as new).
§Arguments
source- Name of the deck to clonedestination- Name for the new deck
§Example
let engine = Engine::new();
let report = engine.organize().clone_deck("Japanese", "Japanese Copy").await?;
println!("Cloned {} notes", report.notes_cloned);Sourcepub async fn merge_decks(
&self,
sources: &[&str],
destination: &str,
) -> Result<MergeReport>
pub async fn merge_decks( &self, sources: &[&str], destination: &str, ) -> Result<MergeReport>
Merge multiple decks into one.
Moves all cards from source decks into the destination deck. Does not delete the source decks.
§Arguments
sources- Names of decks to mergedestination- Name of the destination deck
§Example
let engine = Engine::new();
let report = engine.organize()
.merge_decks(&["Deck A", "Deck B"], "Combined")
.await?;Reorganize cards by tag into subdecks.
For each unique tag, creates a subdeck under the parent deck and moves matching cards there.
§Arguments
source_deck- Deck to reorganizeparent_deck- Parent deck for new subdeckstags- Tags to use for organization
§Example
let engine = Engine::new();
let report = engine.organize()
.reorganize_by_tags("Japanese", "Japanese", &["verb", "noun", "adjective"])
.await?;Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for OrganizeEngine<'a>
impl<'a> !RefUnwindSafe for OrganizeEngine<'a>
impl<'a> Send for OrganizeEngine<'a>
impl<'a> Sync for OrganizeEngine<'a>
impl<'a> Unpin for OrganizeEngine<'a>
impl<'a> !UnwindSafe for OrganizeEngine<'a>
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