pub struct DiagnosticEvent {
pub server_id: Arc<str>,
pub uri: Uri,
pub version: Option<i32>,
pub diagnostics: Arc<[Diagnostic]>,
}Expand description
One diagnostics publish from the server.
Arc<...> on the heavier fields keeps the broadcast clone
cheap: the channel internally buffers the last N events, so
every subscriber that lags a beat ends up cloning the same
Arcs rather than the whole Vec<Diagnostic>.
Fields§
§server_id: Arc<str>Server id (e.g. "rust"). Lets a multi-server setup
disambiguate without carrying the identity through every
hop.
uri: UriURI the diagnostics apply to.
version: Option<i32>Doc version the server computed against. The editor
compares this with its own DocSync::version(uri) and
drops events older than the current version (avoids
stale diagnostics overwriting fresher state when an
edit raced with the publish).
diagnostics: Arc<[Diagnostic]>Diagnostics list. Empty list means “the server cleared this URI’s diagnostics” – a real, meaningful event, don’t filter it out.
Implementations§
Trait Implementations§
Source§impl Clone for DiagnosticEvent
impl Clone for DiagnosticEvent
Source§fn clone(&self) -> DiagnosticEvent
fn clone(&self) -> DiagnosticEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for DiagnosticEvent
impl !RefUnwindSafe for DiagnosticEvent
impl !UnwindSafe for DiagnosticEvent
impl Send for DiagnosticEvent
impl Sync for DiagnosticEvent
impl Unpin for DiagnosticEvent
impl UnsafeUnpin for DiagnosticEvent
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