pub struct LspLogPushed {
pub server_id: Option<Arc<str>>,
pub workspace: Option<Arc<Path>>,
pub level: String,
pub source: String,
pub message: String,
}Expand description
Fired when crate::LspLogger::log appends a record to a
log ring (subsystem-wide when server_id is None,
per-server otherwise). Subscribers (the App’s drain hook)
refresh open *lsp* / *lsp:<server>* /
*lsp:<server>:trace* help buffers from the logger
snapshot so log views update live as records arrive.
Carries primitive String fields rather than typed
LogLevel / LogSource enums because the legacy bus
shape predated the typed-event surface. Future revisions
may switch to typed enums now that the boundary moved
inside lattice-lsp; subscribers can re-snapshot through
the logger when they need the typed value.
Fields§
§server_id: Option<Arc<str>>None for subsystem-wide records; Some(id) per-instance.
Pairs with workspace – both are Some for per-instance
records (post-B’.2), both None for subsystem-wide.
workspace: Option<Arc<Path>>None for subsystem-wide records; Some(path) per-instance.
The workspace root the (server_id, workspace) actor was
spawned against. Two rust-analyzer instances on different
workspaces stay distinct via this field.
level: StringSeverity tag ("trace", "debug", "info", "warn",
"error").
source: StringSource tag ("client", "stderr", "log", "show",
"trace").
message: StringThe record’s message text.
Trait Implementations§
Source§impl Clone for LspLogPushed
impl Clone for LspLogPushed
Source§fn clone(&self) -> LspLogPushed
fn clone(&self) -> LspLogPushed
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 LspLogPushed
impl Debug for LspLogPushed
Source§impl Event for LspLogPushed
impl Event for LspLogPushed
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 LspLogPushed
impl RefUnwindSafe for LspLogPushed
impl Send for LspLogPushed
impl Sync for LspLogPushed
impl Unpin for LspLogPushed
impl UnsafeUnpin for LspLogPushed
impl UnwindSafe for LspLogPushed
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