pub struct WriteEngine { /* private fields */ }Implementations§
Source§impl WriteEngine
impl WriteEngine
pub fn new(settings: Settings, journal_path: PathBuf) -> Result<Self, AgdError>
pub fn with_default_journal(settings: Settings) -> Result<Self, AgdError>
pub fn settings(&self) -> &Settings
pub fn edit( &self, item_ref: &str, intent: &EditIntent, dry_run: bool, context: &WriteContext, ) -> Result<Mutation, AgdError>
pub fn capture( &self, template_key: &str, draft: &CaptureDraft, body: &str, prompts: &BTreeMap<String, String>, dry_run: bool, context: &WriteContext, ) -> Result<Mutation, AgdError>
pub fn refile( &self, item_ref: &str, target_ref: &str, dry_run: bool, context: &WriteContext, ) -> Result<RefileResult, AgdError>
pub fn undo( &self, journal_id: Option<&str>, context: &WriteContext, ) -> Result<UndoResult, AgdError>
pub fn review(&self, journal_id: &str) -> Result<(), AgdError>
pub fn journal(&self) -> Result<Vec<JournalRecord>, AgdError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WriteEngine
impl RefUnwindSafe for WriteEngine
impl Send for WriteEngine
impl Sync for WriteEngine
impl Unpin for WriteEngine
impl UnsafeUnpin for WriteEngine
impl UnwindSafe for WriteEngine
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