pub struct GrammarContributionSet { /* private fields */ }Expand description
The native grammar contributions a plugin declared, each with a trampoline
apply into the guest, ready for the caller to register into its
CommandRegistry. The host builds the specs (owning the trampoline over the
guest store) but never owns the registry — register_all
takes the caller’s &mut CommandRegistry and stamps every entry
SourceLayer::Plugin(plugin_id) via the register_plugin_* seam
(mode-ownership; ZERO Editor:: methods).
Implementations§
Source§impl GrammarContributionSet
impl GrammarContributionSet
Sourcepub fn plugin_id(&self) -> PluginId
pub fn plugin_id(&self) -> PluginId
The host-issued id of the plugin behind these contributions (the u32
stamped into SourceLayer::Plugin).
Sourcepub fn register_all(
self,
registry: &mut CommandRegistry,
) -> Vec<WiredOperatorChord>
pub fn register_all( self, registry: &mut CommandRegistry, ) -> Vec<WiredOperatorChord>
Register every contribution into the caller’s CommandRegistry, stamped
SourceLayer::Plugin(plugin_id). Consumes the set (the specs own boxed
trampoline closures). The registry, dispatcher, and :describe-* views
then treat each entry exactly like a builtin (paramount #3).
Auto Trait Implementations§
impl !RefUnwindSafe for GrammarContributionSet
impl !UnwindSafe for GrammarContributionSet
impl Freeze for GrammarContributionSet
impl Send for GrammarContributionSet
impl Sync for GrammarContributionSet
impl Unpin for GrammarContributionSet
impl UnsafeUnpin for GrammarContributionSet
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
§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