#[non_exhaustive]pub enum DecorationKind {
Diagnostic {
severity: Severity,
message: Arc<str>,
code: Option<Arc<str>>,
},
FindMatch,
SnippetStop {
index: u8,
},
AutoClosePair,
}Expand description
What a tracked range is. The variant carries every distinction the render path, a diagnostics panel, and a future hover need directly — no separate owner-id or filter machinery alongside it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Diagnostic
A compiler finding. severity, message, and code ride the store so
position and content stay reunited in one place; code is the
compiler’s diagnostic code.
Fields
FindMatch
A find/search hit. The find controller re-queries the whole match set on
every edit, so a collapsed hit is dropped rather than kept — its
empty-range policy is EmptyPolicy::Drop.
SnippetStop
A snippet placeholder stop. Active-ness lives in the range’s
Stickiness, not here — the active stop is AlwaysGrows, the rest
NeverGrows.
AutoClosePair
The provenance region of an auto-inserted closing pair.
Implementations§
Source§impl DecorationKind
impl DecorationKind
Sourcepub fn empty_policy(&self) -> EmptyPolicy
pub fn empty_policy(&self) -> EmptyPolicy
Post-commit policy for a range of this kind that has collapsed to empty:
FindMatch is re-queried so it drops; everything else
keeps (the owner controls its lifetime).
Trait Implementations§
Source§impl Clone for DecorationKind
impl Clone for DecorationKind
Source§fn clone(&self) -> DecorationKind
fn clone(&self) -> DecorationKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more