pub struct PreprocessorRegistry { /* private fields */ }Expand description
Registry of available preprocessors.
Preprocessors are checked in registration order. The first preprocessor
whose matches_extension returns true for a filename wins.
Implementations§
Source§impl PreprocessorRegistry
impl PreprocessorRegistry
Sourcepub fn register(&mut self, preprocessor: Box<dyn Preprocessor>)
pub fn register(&mut self, preprocessor: Box<dyn Preprocessor>)
Register a preprocessor.
Sourcepub fn find_for_file(&self, filename: &str) -> Option<&dyn Preprocessor>
pub fn find_for_file(&self, filename: &str) -> Option<&dyn Preprocessor>
Find the preprocessor that handles a given filename, if any.
Sourcepub fn is_preprocessor_file(&self, filename: &str) -> bool
pub fn is_preprocessor_file(&self, filename: &str) -> bool
Whether any registered preprocessor handles this filename.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreprocessorRegistry
impl !RefUnwindSafe for PreprocessorRegistry
impl Send for PreprocessorRegistry
impl Sync for PreprocessorRegistry
impl Unpin for PreprocessorRegistry
impl UnsafeUnpin for PreprocessorRegistry
impl !UnwindSafe for PreprocessorRegistry
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