pub struct LocalExecutor { /* private fields */ }Implementations§
Source§impl LocalExecutor
impl LocalExecutor
Sourcepub fn new(doc: Doc, now: (i64, u32), allow_shell: bool) -> Self
pub fn new(doc: Doc, now: (i64, u32), allow_shell: bool) -> Self
An executor over a fixed materialized Doc (no live re-read).
Sourcepub fn with_url_roots(self, map: HashMap<String, NodeId>) -> Self
pub fn with_url_roots(self, map: HashMap<String, NodeId>) -> Self
Register the reference targets (identifier → mounted root)
the arrow may land on. See Doc::url_roots.
Sourcepub fn with_model(self, model: Option<Model>) -> Self
pub fn with_model(self, model: Option<Model>) -> Self
Attach a --model file: the session runs every query against
the enriched view.
Trait Implementations§
Source§impl Executor for LocalExecutor
impl Executor for LocalExecutor
fn run(&self, query: &str) -> Result<Vec<Cell>>
Source§fn refs(&self) -> Vec<String>
fn refs(&self) -> Vec<String>
The unresolved external references the last
run recorded:
identifiers (URLs, for html) of documents queries referenced
(::href-->) but could not reach. The engine performs no IO
— the host may acquire these, remount, and re-run the line.
Empty by default.Source§fn run_fresh(&self, query: &str) -> Result<Vec<Cell>>
fn run_fresh(&self, query: &str) -> Result<Vec<Cell>>
Run against a freshly re-materialized source — the
&N!
live reading. The default re-runs against the standing arbor
(an immutable source never drifts); executors that can re-open
the source override it so a live reading sees current data,
diverging from the frozen &N#.Source§fn complete(&self, text: &str, cursor: usize) -> Vec<Candidate>
fn complete(&self, text: &str, cursor: usize) -> Vec<Candidate>
Tab-completion candidates at a byte cursor. The default
answers the syntax tier (the stdlib registry needs no
adapter), so even a daemon-backed session completes
function names; executors with a live arbor override this
with the data tier — real children, real annotations.
Auto Trait Implementations§
impl !Freeze for LocalExecutor
impl !RefUnwindSafe for LocalExecutor
impl !Send for LocalExecutor
impl !Sync for LocalExecutor
impl !UnwindSafe for LocalExecutor
impl Unpin for LocalExecutor
impl UnsafeUnpin for LocalExecutor
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