pub struct ParserRegistry { /* private fields */ }Expand description
Ordered collection of LinkParsers. Lookups always follow registration
order.
Implementations§
Source§impl ParserRegistry
impl ParserRegistry
Sourcepub fn register(&mut self, parser: Arc<dyn LinkParser>)
pub fn register(&mut self, parser: Arc<dyn LinkParser>)
Appends a parser; later registrations are consulted after earlier ones.
Sourcepub fn with(self, parser: Arc<dyn LinkParser>) -> Self
pub fn with(self, parser: Arc<dyn LinkParser>) -> Self
Builder-style variant of ParserRegistry::register.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Arc<dyn LinkParser>>
pub fn iter(&self) -> impl Iterator<Item = &Arc<dyn LinkParser>>
Iterates over registered parsers in registration order.
Trait Implementations§
Source§impl Clone for ParserRegistry
impl Clone for ParserRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for ParserRegistry
impl !UnwindSafe for ParserRegistry
impl Forget for ParserRegistry
impl Freeze for ParserRegistry
impl Move for ParserRegistry
impl Send for ParserRegistry
impl Sync for ParserRegistry
impl Unpin for ParserRegistry
impl UnsafeUnpin for ParserRegistry
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