Expand description
OM.A1 — the per-plugin actor bridge for scanned-excerpt-source providers.
The agenda analogue of media_task.rs, and deliberately its near-twin: a
dedicated async task owns the plugin’s Store<PluginState> for life (the
Store is !Sync), an [ScanCall] crosses an mpsc channel with a
oneshot reply, and the Send + Sync ScanClient serialises calls
onto the single-consumer loop.
The serialisation is load-bearing here, not incidental. begin drops
per-scan state and every following scan reads it, so the two must not
interleave with a second scan’s calls. One actor, one queue, in order —
which is also why the scan walks files sequentially rather than fanning
out across the pool.
This is the fifth near-copy of the picker / completion / decoration / media
actor. The rule-of-three note in completion_task is now well past earned;
generalising over the bindings type is worth doing the next time one of
them changes shape, and this slice deliberately did not take that on
mid-seam.
Structs§
- Annotation
- HB.5: the row an
Entryhangs below itself. HB.5: one line hung below a row, and how it is coloured. - Clock
Span - OA.14b: a file’s clocked time, reported beside its rows. OA.14b: time clocked on one headline on one day.
- Display
Span - OA.5: the per-row style spans an
Entrycarries. PS.1: a styled run of a candidate’sdisplaytext. - Entry
- The WIT
entry, re-exported so the adapter and the loader name one type. One agenda row the guest recognised in a file. - Scan
Actor - The per-plugin actor: owns the
Store+ agenda bindings for the plugin’s life and serves calls off the channel until everyScanClientdrops. - Scan
Client - The
Send + Synchandle a caller holds. Cloning is cheap; every clone talks to the same actor /Store, so calls serialise on the single-consumer loop the!SyncStorerequires — which is exactly whatbegin-then-scanneeds. - Scan
Result - OA.14b: a file’s clocked time, reported beside its rows. What one file’s scan produced.