pub struct LoadedLexConfig {
pub config: LexConfig,
pub extension_diagnostic_rules: BTreeMap<String, RuleConfig>,
}Expand description
Typed configuration plus the side-channel map of extension-emitted
diagnostic rules. Returned by [apply_extension_rules_callback]-aware
loaders.
The typed LexConfig holds built-in fields exactly. Extension
diagnostic codes (<namespace>.<code> entries under
[diagnostics.rules]) live in extension_diagnostic_rules so that
dropping the previous #[serde(flatten)] catch-all restored typo
detection on built-in field names while still accepting the open-
ended extension key space.
Fields§
§config: LexConfig§extension_diagnostic_rules: BTreeMap<String, RuleConfig>Side-channel map of extension-emitted diagnostic rules keyed by
their on-the-wire code (<namespace>.<code>). Populated from
[diagnostics.rules] entries accepted by the loader’s
on_unknown_key callback.
Implementations§
Source§impl LoadedLexConfig
impl LoadedLexConfig
Sourcepub fn lookup_diagnostic_rule(&self, code: &str) -> Option<&RuleConfig>
pub fn lookup_diagnostic_rule(&self, code: &str) -> Option<&RuleConfig>
Look up a [diagnostics.rules] entry by its on-the-wire code,
consulting built-in fields first and the extension side-channel
second. Built-ins always win — a stray extension key that
happens to spell a built-in code does not override the typed
surface.
Trait Implementations§
Source§impl Clone for LoadedLexConfig
impl Clone for LoadedLexConfig
Source§fn clone(&self) -> LoadedLexConfig
fn clone(&self) -> LoadedLexConfig
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 LoadedLexConfig
impl RefUnwindSafe for LoadedLexConfig
impl Send for LoadedLexConfig
impl Sync for LoadedLexConfig
impl Unpin for LoadedLexConfig
impl UnsafeUnpin for LoadedLexConfig
impl UnwindSafe for LoadedLexConfig
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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