pub struct WasmScannedExcerptSource { /* private fields */ }Expand description
An async agenda-row producer over a plugin’s ScanClient.
Implementations§
Source§impl WasmScannedExcerptSource
impl WasmScannedExcerptSource
pub fn new( client: ScanClient, extensions: Vec<String>, view_mode: Option<String>, ) -> Self
Sourcepub fn with_cache(self, dir: &Path) -> Self
pub fn with_cache(self, dir: &Path) -> Self
OT.3b: give this source a persistent result cache rooted at dir
(the plugin’s own data directory, so two plugins cannot collide and
uninstalling one removes its cache).
Opt-in rather than built in new: a caller with no data directory —
tests, benches — gets an uncached source that behaves identically, just
slower, which is also what makes the cache easy to A/B.
pub fn plugin_id(&self) -> PluginId
Trait Implementations§
Source§impl Clone for WasmScannedExcerptSource
impl Clone for WasmScannedExcerptSource
Source§fn clone(&self) -> WasmScannedExcerptSource
fn clone(&self) -> WasmScannedExcerptSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WasmScannedExcerptSource
impl Debug for WasmScannedExcerptSource
Source§impl ScannedExcerptSource for WasmScannedExcerptSource
impl ScannedExcerptSource for WasmScannedExcerptSource
Source§fn roots(&self) -> ScanRootsFuture<'_>
fn roots(&self) -> ScanRootsFuture<'_>
AF.1. NOT cached beside extensions / view_mode, and that asymmetry
is the point: those are facts about the source, this is a fact about the
user’s config. Caching it would make the source’s own setting appear not
to work until the editor restarted.
A guest that traps or is quarantined answers empty rather than failing
the scan — the same degradation begin gets, one step earlier.
Source§fn describe(&self, args: &[String]) -> ScanDescribeFuture<'_>
fn describe(&self, args: &[String]) -> ScanDescribeFuture<'_>
OA.22. Degrades to empty on a trap or a quarantined guest, exactly as
roots does — a header that could not be built is a missing phrase, not
a failed scan.
Source§fn source_id(&self) -> u64
fn source_id(&self) -> u64
Source§fn extensions(&self) -> &[String]
fn extensions(&self) -> &[String]
Source§fn view_mode(&self) -> Option<&str>
fn view_mode(&self) -> Option<&str>
Source§fn begin(&self, args: &[String]) -> ScanBeginFuture<'_>
fn begin(&self, args: &[String]) -> ScanBeginFuture<'_>
Auto Trait Implementations§
impl !RefUnwindSafe for WasmScannedExcerptSource
impl !UnwindSafe for WasmScannedExcerptSource
impl Freeze for WasmScannedExcerptSource
impl Send for WasmScannedExcerptSource
impl Sync for WasmScannedExcerptSource
impl Unpin for WasmScannedExcerptSource
impl UnsafeUnpin for WasmScannedExcerptSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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