pub struct EventDescriptor {
pub name: &'static str,
pub doc: &'static str,
pub source_crate: &'static str,
pub type_id: fn() -> TypeId,
}Expand description
Per-event metadata aggregated into EVENT_DESCRIPTORS.
:describe-events walks this slice; subscriber tooling
(future “wait-for-event” debuggers, plugin host) can also
enumerate it.
name is the user-facing identifier ("lsp.buffer-attached",
"document.changed"); convention: lowercase,
dot-separated, namespaced by feature.
Fields§
§name: &'static strUser-facing identifier ("lsp.buffer-attached").
doc: &'static strOne-line summary :describe-events prints.
source_crate: &'static strThe crate that declared the event ("lattice-lsp").
type_id: fn() -> TypeIdReturns the TypeId of the concrete event type. Stored
as a fn pointer (rather than the TypeId directly)
because TypeId::of::<T>() is non-const today; the
distributed-slice entries call this once at registry
build time.
Trait Implementations§
Source§impl Clone for EventDescriptor
impl Clone for EventDescriptor
Source§fn clone(&self) -> EventDescriptor
fn clone(&self) -> EventDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EventDescriptor
Auto Trait Implementations§
impl Freeze for EventDescriptor
impl RefUnwindSafe for EventDescriptor
impl Send for EventDescriptor
impl Sync for EventDescriptor
impl Unpin for EventDescriptor
impl UnsafeUnpin for EventDescriptor
impl UnwindSafe for EventDescriptor
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
Mutably borrows from an owned value. Read more