pub struct MessageBusFactoryRegistry { /* private fields */ }Expand description
Registry for Python message bus backing factory extractors.
Implementations§
Source§impl MessageBusFactoryRegistry
impl MessageBusFactoryRegistry
Sourcepub fn register(
&self,
type_name: String,
extractor: MessageBusFactoryExtractor,
) -> Result<()>
pub fn register( &self, type_name: String, extractor: MessageBusFactoryExtractor, ) -> Result<()>
Registers an extractor for a Python factory type name.
§Errors
Returns an error if a different extractor is already registered for the type name.
Sourcepub fn extract(
&self,
py: Python<'_>,
factory: Py<PyAny>,
) -> PyResult<Box<dyn MessageBusBackingFactory>>
pub fn extract( &self, py: Python<'_>, factory: Py<PyAny>, ) -> PyResult<Box<dyn MessageBusBackingFactory>>
Extracts a Python object into a boxed message bus backing factory.
§Errors
Returns an error if no extractor is registered for the Python type or extraction fails.
Trait Implementations§
Source§impl Debug for MessageBusFactoryRegistry
impl Debug for MessageBusFactoryRegistry
Auto Trait Implementations§
impl !Freeze for MessageBusFactoryRegistry
impl !RefUnwindSafe for MessageBusFactoryRegistry
impl Send for MessageBusFactoryRegistry
impl Sync for MessageBusFactoryRegistry
impl Unpin for MessageBusFactoryRegistry
impl UnsafeUnpin for MessageBusFactoryRegistry
impl UnwindSafe for MessageBusFactoryRegistry
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