pub struct LanguagesRegistered {
pub plugin: PluginId,
}Expand description
Fired once per plugin load whose drain could have changed the
mode/language catalog — i.e. the manifest declared language or modes.
Published after the plugin’s entire drain completes, never per registered language: a subscriber re-resolving major modes must see a fully-installed catalog, and a plugin that ships a language and the major mode that binds it would otherwise be observed half-way through.
Declared-seam gated rather than registered-count gated. A plugin whose every language was rejected publishes anyway, which costs one wasted re-resolution that finds nothing; the inverse mistake — deriving the gate from what actually registered — would need each drain to report a count upward, and a drain that forgot to would fail silently in exactly the way this whole area keeps failing.
Fields§
§plugin: PluginIdThe host-issued id of the plugin whose load changed the catalog. The
plugin’s user-facing identity is its manifest name, carried by
Event::PluginLoaded; this id is here so a subscriber can correlate the
two, not so it can look anything up.
Trait Implementations§
Source§impl Clone for LanguagesRegistered
impl Clone for LanguagesRegistered
Source§fn clone(&self) -> LanguagesRegistered
fn clone(&self) -> LanguagesRegistered
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 LanguagesRegistered
impl Debug for LanguagesRegistered
Source§impl Event for LanguagesRegistered
impl Event for LanguagesRegistered
Source§fn event_type_id(&self) -> EventTypeId
fn event_type_id(&self) -> EventTypeId
static to avoid
re-allocating the metadata on every call. The macro
register_event! generates this for you.Auto Trait Implementations§
impl Freeze for LanguagesRegistered
impl RefUnwindSafe for LanguagesRegistered
impl Send for LanguagesRegistered
impl Sync for LanguagesRegistered
impl Unpin for LanguagesRegistered
impl UnsafeUnpin for LanguagesRegistered
impl UnwindSafe for LanguagesRegistered
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