pub struct ParserRegistry { /* private fields */ }Expand description
Registry for custom parser backends.
Implementations§
Source§impl ParserRegistry
impl ParserRegistry
pub fn new() -> Self
pub fn register_factory( &mut self, name: String, factory: Box<dyn CqlParserFactory + Send + Sync>, )
pub fn get_factory( &self, name: &str, ) -> Option<&(dyn CqlParserFactory + Send + Sync)>
pub fn list_factories(&self) -> Vec<&str>
Sourcepub fn create_with_factory(
&self,
factory_name: &str,
config: ParserConfig,
) -> Result<Box<dyn CqlParser>>
pub fn create_with_factory( &self, factory_name: &str, config: ParserConfig, ) -> Result<Box<dyn CqlParser>>
Create a parser using a registered factory.
Trait Implementations§
Source§impl Debug for ParserRegistry
impl Debug for ParserRegistry
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 !RefUnwindSafe for ParserRegistry
impl !UnwindSafe for ParserRegistry
impl Freeze 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