pub enum Event {
Log {
level: LogLevel,
msg: String,
},
Progress {
done: u64,
total: Option<u64>,
msg: String,
},
Note {
path: String,
action: NoteAction,
},
Result {
ok: bool,
summary: Option<Value>,
data: Option<Value>,
no_index: bool,
},
}Expand description
One newline-delimited JSON record on a plugin’s stdout. Externally tagged on type.
Streaming = emit Progress/Note as work happens, then a final Result. Batch = emit
only the final Result. Same schema; the plugin chooses.
Variants§
Log
A structured log line core may render uniformly (human-readable logs also go to stderr).
Progress
Progress for a uniform progress indicator. total omitted ⇒ indeterminate.
Note
A vault note the plugin created/changed. path is relative to the vault root. Core
collects these and runs one incremental index after the plugin exits cleanly.
Result
Terminal event. summary/data are plugin-defined JSON. no_index: true tells core to skip
the post-run index pass (e.g. a --dry-run).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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