pub struct MqEngine;Expand description
Thin wrapper around mq_lang::DefaultEngine for evaluating mq programs
over Markdown content.
Implementations§
Source§impl MqEngine
impl MqEngine
Sourcepub fn eval_files(code: &str, paths: &[&Path]) -> Result<Vec<String>, MqdbError>
pub fn eval_files(code: &str, paths: &[&Path]) -> Result<Vec<String>, MqdbError>
Run an mq program against one or more files on disk.
Each file is parsed independently; results from all files are concatenated in order.
§Errors
Returns MqdbError::Io if a file cannot be read,
MqdbError::Mq if parsing or evaluation fails.
Sourcepub fn eval_store(
code: &str,
store: &DocumentStore,
) -> Result<Vec<String>, MqdbError>
pub fn eval_store( code: &str, store: &DocumentStore, ) -> Result<Vec<String>, MqdbError>
Run an mq program against all file-backed documents in a store.
Documents that were added via DocumentStore::add_str (no path)
are silently skipped.
Auto Trait Implementations§
impl Freeze for MqEngine
impl RefUnwindSafe for MqEngine
impl Send for MqEngine
impl Sync for MqEngine
impl Unpin for MqEngine
impl UnsafeUnpin for MqEngine
impl UnwindSafe for MqEngine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more