pub struct DriverRegistry<Context: Send + Sync> { /* private fields */ }Expand description
Drivers keyed by the specs they own.
Implementations§
Source§impl<Context: Send + Sync> DriverRegistry<Context>
impl<Context: Send + Sync> DriverRegistry<Context>
Sourcepub fn register(
&mut self,
driver: Arc<dyn WorkflowDriver<Context>>,
) -> Result<&mut Self, SupervisorError>
pub fn register( &mut self, driver: Arc<dyn WorkflowDriver<Context>>, ) -> Result<&mut Self, SupervisorError>
Register a driver. Duplicate spec ownership is a startup error because dispatch must never depend on registration order.
Sourcepub fn for_spec(
&self,
spec_id: &str,
) -> Option<&Arc<dyn WorkflowDriver<Context>>>
pub fn for_spec( &self, spec_id: &str, ) -> Option<&Arc<dyn WorkflowDriver<Context>>>
Driver owning spec_id.
Sourcepub fn validate_all(&self) -> Result<(), SupervisorError>
pub fn validate_all(&self) -> Result<(), SupervisorError>
Validate every driver’s spec set.
Trait Implementations§
Auto Trait Implementations§
impl<Context> !RefUnwindSafe for DriverRegistry<Context>
impl<Context> !UnwindSafe for DriverRegistry<Context>
impl<Context> Freeze for DriverRegistry<Context>where
Vec<Arc<dyn WorkflowDriver<Context>>>: Freeze,
HashMap<String, Arc<dyn WorkflowDriver<Context>>>: Freeze,
impl<Context> Send for DriverRegistry<Context>where
Vec<Arc<dyn WorkflowDriver<Context>>>: Send,
HashMap<String, Arc<dyn WorkflowDriver<Context>>>: Send,
impl<Context> Sync for DriverRegistry<Context>where
Vec<Arc<dyn WorkflowDriver<Context>>>: Sync,
HashMap<String, Arc<dyn WorkflowDriver<Context>>>: Sync,
impl<Context> Unpin for DriverRegistry<Context>where
Vec<Arc<dyn WorkflowDriver<Context>>>: Unpin,
HashMap<String, Arc<dyn WorkflowDriver<Context>>>: Unpin,
impl<Context> UnsafeUnpin for DriverRegistry<Context>where
Vec<Arc<dyn WorkflowDriver<Context>>>: UnsafeUnpin,
HashMap<String, Arc<dyn WorkflowDriver<Context>>>: UnsafeUnpin,
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