pub struct AnalyzerRegistry { /* private fields */ }Expand description
Registry of named analyzers with fallback resolution.
Implements the analyzer resolution chain from [[analyzers#Analyzer Resolution]]:
- Look up by exact name
- Fall back to the
standardanalyzer
All built-in analyzers are registered on construction.
Implementations§
Source§impl AnalyzerRegistry
impl AnalyzerRegistry
Sourcepub fn register(&mut self, analyzer: Analyzer)
pub fn register(&mut self, analyzer: Analyzer)
Register a custom analyzer. Overwrites any existing analyzer with the same name.
Sourcepub fn get(&self, name: &str) -> &Analyzer
pub fn get(&self, name: &str) -> &Analyzer
Look up an analyzer by name, falling back to standard.
Trait Implementations§
Source§impl Debug for AnalyzerRegistry
impl Debug for AnalyzerRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for AnalyzerRegistry
impl !UnwindSafe for AnalyzerRegistry
impl Freeze for AnalyzerRegistry
impl Send for AnalyzerRegistry
impl Sync for AnalyzerRegistry
impl Unpin for AnalyzerRegistry
impl UnsafeUnpin for AnalyzerRegistry
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
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>
Converts
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>
Converts
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