pub struct LoaderServices {Show 23 fields
pub runtime: Option<Handle>,
pub bus: Option<Arc<EventBus>>,
pub picker_registry: Option<PickerRegistryHandle>,
pub config_registry: Option<Arc<ConfigRegistry>>,
pub command_registry: Option<CommandRegistryHandle>,
pub mode_registry: Option<ModeRegistryHandle>,
pub keymap: Option<KeymapHandle>,
pub meta_sink: Option<PluginMetaSinkHandle>,
pub decoration_registry: Option<GutterDecorationSourceRegistryHandle>,
pub media_registry: Option<MediaSourceRegistryHandle>,
pub agenda_registry: Option<ScannedExcerptSourceRegistryHandle>,
pub operator_chords: Option<OperatorChordWirerHandle>,
pub provider_view_registry: Option<ProviderViewRegistryHandle>,
pub multibuffer_registry: Option<MultibufferRegistryHandle>,
pub context_registry: Option<ContextSourceRegistryHandle>,
pub theme_registry: Option<ThemeRegistryHandle>,
pub sign_registry: Option<SignRegistryHandle>,
pub modeline: Option<ModelineServiceHandle>,
pub parser_factories: Option<CompilationParserFactoriesHandle>,
pub help_topics: Option<HelpTopicRegistryHandle>,
pub dashboard_sections: Option<DashboardRegistryHandle>,
pub transient_registry: Option<TransientSourceRegistryHandle>,
pub tracer: Option<PluginTracerHandle>,
}Expand description
The editor-side runtime environment the loader drives seams against —
captured once from the boot context in [install], or built directly by a
headless harness / test. Every handle is Option because a given consumer
wires only the seams it exercises; a seam drain with an absent handle is a
logged skip, never a panic. Grows one field per seam without churning the
PluginLoader::with_services signature.
Fields§
§runtime: Option<Handle>The shared multi-thread runtime handle (seam actors + discovery run here, never the current-thread editor actor).
bus: Option<Arc<EventBus>>The typed event bus — seam-actor crash quarantine binds to it, and event plugins subscribe through it.
picker_registry: Option<PickerRegistryHandle>The runtime-mutable picker registry (RCU-register loaded picker sources).
config_registry: Option<Arc<ConfigRegistry>>The config registry (already interior-mutable) plugin options register into.
command_registry: Option<CommandRegistryHandle>The runtime-mutable command registry (B3a/B3b) a grammar plugin’s
motions / operators / text-objects / ex-commands register into. The
dispatch path (DocumentActor, host-side ex-command / completion reads)
snapshots it wait-free with .load(), so a plugin registered at runtime
is live for a buffer on its next keystroke.
mode_registry: Option<ModeRegistryHandle>The runtime-mutable mode registry (B2) a mode plugin’s minor modes
register into. RCU’d like the command registry — an owned snapshot is
cloned, spawn_mode_plugin drains into it, and it is published, so
keymap-resolution / mode-activation reads stay wait-free.
keymap: Option<KeymapHandle>The interior-mutable keymap handle a mode plugin’s per-mode MinorMode
keymap bindings land in (a shared clone — its writes are internally
mutex+ArcSwap-routed, so spawn_mode_plugin mutates it through a &).
meta_sink: Option<PluginMetaSinkHandle>The provenance sink — records PluginId → name/doc for :list-plugins.
decoration_registry: Option<GutterDecorationSourceRegistryHandle>PL8.E: the runtime-mutable decoration-producer registry (RCU-register a
loaded decoration plugin’s WasmDecorationSource). The host’s per-tick
maybe_refresh_wasm_decorations reads the same handle wait-free.
media_registry: Option<MediaSourceRegistryHandle>IM.6b: where a loaded media plugin’s producer is registered.
agenda_registry: Option<ScannedExcerptSourceRegistryHandle>OM.A1: where a plugin’s agenda-row producer lands. Absent leaves the
seam NotWired — the load fails loudly rather than reporting success
and contributing nothing to every :agenda forever.
operator_chords: Option<OperatorChordWirerHandle>CM.2: binds a plugin operator’s declared chord into the universal
operator-pending layer. The host owns it because the composition needs
host-resolved builtins; the plugin owns the spec and apply. Absent
leaves the seam NotWired for any plugin that declares a chord — an
operator that registered correctly and has no keys is indistinguishable
from one that never loaded.
provider_view_registry: Option<ProviderViewRegistryHandle>MV.1: the provider-view registry a plugin’s declared multibuffer views
register openers into — the SAME one the agenda and magit’s project-diff
use, so a plugin view opens through open-provider-view and refreshes
through gr exactly as a native one does. Absent leaves the seam
NotWired, failing the load loudly rather than reporting success and
contributing a view that can never be opened.
multibuffer_registry: Option<MultibufferRegistryHandle>The multibuffer registry the view’s excerpts land in once build
answers. Separate from the provider registry because they are different
services: one resolves a NAME to an opener, the other a view’s BufferId
to its excerpt handle.
context_registry: Option<ContextSourceRegistryHandle>TC.2: the runtime-mutable context-producer registry (RCU-register a
loaded context plugin’s WasmContextSource). The host’s reparse-driven
refresh reads the same handle wait-free.
theme_registry: Option<ThemeRegistryHandle>TC.4: the theme registry a theme plugin’s elements register into — the
SAME one builtins use, so a plugin element is themeable and
:customize-able like any other.
sign_registry: Option<SignRegistryHandle>SG.3a: the sign registry a signs plugin’s definitions land in — the
SAME one native producers use, so a plugin’s sign is styled through the
ordinary theme registry and contends for the mark cell by the same
priority rule, with no host kind-branch.
modeline: Option<ModelineServiceHandle>OC.3 / ML.6: the modeline element registry a plugin’s ui.register-segment
declares into — the SAME one built-ins and native modes use, so a plugin
segment lays out, orders and hides exactly like lsp or claude-code
with no renderer branch anywhere.
parser_factories: Option<CompilationParserFactoriesHandle>CM.6b: the compilation parser-factory registry an error-parser
plugin’s factory RCU-registers into. The compilation service reads
the same handle once per run to mint each pipe reader’s parser.
help_topics: Option<HelpTopicRegistryHandle>CR.3: the help-topic registry a help plugin’s pages RCU-register
into — the SAME one the builtin docs live in, so a plugin page opens,
completes and cross-links like any other.
dashboard_sections: Option<DashboardRegistryHandle>CR.4: the dashboard section registry a dashboard plugin’s sections
RCU-register into. Shadowing rather than overwriting (CR.2), so a
plugin replacing a builtin section is reversed by unload.
transient_registry: Option<TransientSourceRegistryHandle>TR.2b: the transient-menu registry a transient-source plugin’s menu
registers into — the SAME one magit’s menus live in, so a plugin menu
opens through Effect::OpenTransient like any other. Owned by
editor_boot since TR.1, which is what stops a plugin menu depending
on whether magit happened to load.
tracer: Option<PluginTracerHandle>PO.2: the boundary tracer the loader attaches to each async seam actor
(actor.with_tracer(...) before spawning run()), so the actor emits a
PluginTraceRecord per guest call. None degrades to no tracing.
Trait Implementations§
Source§impl Clone for LoaderServices
impl Clone for LoaderServices
Source§fn clone(&self) -> LoaderServices
fn clone(&self) -> LoaderServices
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for LoaderServices
impl Default for LoaderServices
Source§fn default() -> LoaderServices
fn default() -> LoaderServices
Auto Trait Implementations§
impl !RefUnwindSafe for LoaderServices
impl !UnwindSafe for LoaderServices
impl Freeze for LoaderServices
impl Send for LoaderServices
impl Sync for LoaderServices
impl Unpin for LoaderServices
impl UnsafeUnpin for LoaderServices
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