pub struct ParserFactory { /* private fields */ }Expand description
Factory for creating reasoning parsers based on model type.
Implementations§
Source§impl ParserFactory
impl ParserFactory
Sourcepub fn get_pooled(&self, model_id: &str) -> PooledParser
pub fn get_pooled(&self, model_id: &str) -> PooledParser
Get a pooled parser for the given model ID. Returns a shared instance that can be used concurrently. Falls back to a passthrough parser if model is not recognized.
Sourcepub fn create(
&self,
model_id: &str,
) -> Result<Box<dyn ReasoningParser>, ParseError>
pub fn create( &self, model_id: &str, ) -> Result<Box<dyn ReasoningParser>, ParseError>
Create a new parser instance for the given model ID. Returns a fresh instance (not pooled). Use this when you need an isolated parser instance.
Sourcepub fn registry(&self) -> &ParserRegistry
pub fn registry(&self) -> &ParserRegistry
Get the internal registry for custom registration.
Sourcepub fn clear_pool(&self)
pub fn clear_pool(&self)
Clear the parser pool. Useful for testing or when parsers need to be reset globally.
Trait Implementations§
Source§impl Clone for ParserFactory
impl Clone for ParserFactory
Source§fn clone(&self) -> ParserFactory
fn clone(&self) -> ParserFactory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParserFactory
impl RefUnwindSafe for ParserFactory
impl Send for ParserFactory
impl Sync for ParserFactory
impl Unpin for ParserFactory
impl UnwindSafe for ParserFactory
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