Skip to main content

LoaderServices

Struct LoaderServices 

Source
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

Source§

fn clone(&self) -> LoaderServices

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for LoaderServices

Source§

fn default() -> LoaderServices

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more