pub struct FactoryRegistry { /* private fields */ }
Expand description
Registry for PyO3 factory and config extractors.
This allows each adapter to register its own extraction logic for converting
PyObjects
to boxed trait objects without requiring the live crate to know
about specific implementations.
Implementations§
Source§impl FactoryRegistry
impl FactoryRegistry
Sourcepub fn register_factory_extractor(
&self,
name: String,
extractor: FactoryExtractor,
) -> Result<()>
pub fn register_factory_extractor( &self, name: String, extractor: FactoryExtractor, ) -> Result<()>
Sourcepub fn register_config_extractor(
&self,
type_name: String,
extractor: ConfigExtractor,
) -> Result<()>
pub fn register_config_extractor( &self, type_name: String, extractor: ConfigExtractor, ) -> Result<()>
Sourcepub fn extract_factory(
&self,
py: Python<'_>,
factory: PyObject,
) -> PyResult<Box<dyn DataClientFactory>>
pub fn extract_factory( &self, py: Python<'_>, factory: PyObject, ) -> PyResult<Box<dyn DataClientFactory>>
Sourcepub fn extract_config(
&self,
py: Python<'_>,
config: PyObject,
) -> PyResult<Box<dyn ClientConfig>>
pub fn extract_config( &self, py: Python<'_>, config: PyObject, ) -> PyResult<Box<dyn ClientConfig>>
Trait Implementations§
Source§impl Debug for FactoryRegistry
impl Debug for FactoryRegistry
Auto Trait Implementations§
impl !Freeze for FactoryRegistry
impl RefUnwindSafe for FactoryRegistry
impl Send for FactoryRegistry
impl Sync for FactoryRegistry
impl Unpin for FactoryRegistry
impl UnwindSafe for FactoryRegistry
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more