pub struct ParserRegistry { /* private fields */ }
Implementations§
Source§impl ParserRegistry
impl ParserRegistry
pub fn with_parser(self, id: impl ToString, parser: ParserHandle) -> Self
pub fn with_extension<T: Send + Sync + 'static>(self, data: T) -> Self
pub fn add_parser(&self, id: impl ToString, parser: ParserHandle)
pub fn remove_parser(&self, id: impl AsRef<str>) -> Option<ParserHandle>
pub fn get_parser(&self, id: impl AsRef<str>) -> Option<ParserHandle>
pub fn parse<'a>(&self, id: impl AsRef<str>, input: &'a str) -> ParseResult<'a>
pub fn extend( &self, id: impl AsRef<str>, parser: ParserHandle, ) -> Result<(), Box<dyn Error>>
pub fn add_extension<T: Send + Sync + 'static>(&self, data: T) -> bool
pub fn remove_extension<T: 'static>(&self) -> bool
pub fn extension<T: Send + Sync + 'static>(&self) -> Option<Arc<T>>
Trait Implementations§
Source§impl Default for ParserRegistry
impl Default for ParserRegistry
Source§fn default() -> ParserRegistry
fn default() -> ParserRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ParserRegistry
impl RefUnwindSafe for ParserRegistry
impl Send for ParserRegistry
impl Sync for ParserRegistry
impl Unpin for ParserRegistry
impl UnwindSafe 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