pub struct HandlerRegistry { /* private fields */ }Expand description
Registry of call, run, and custom task handlers. Uses Arc for cheap cloning — handlers are shared across workflow context propagation.
Implementations§
Source§impl HandlerRegistry
impl HandlerRegistry
Sourcepub fn register_call_handler(&mut self, handler: Box<dyn CallHandler>)
pub fn register_call_handler(&mut self, handler: Box<dyn CallHandler>)
Registers a call handler
Sourcepub fn register_run_handler(&mut self, handler: Box<dyn RunHandler>)
pub fn register_run_handler(&mut self, handler: Box<dyn RunHandler>)
Registers a run handler
Sourcepub fn register_custom_task_handler(
&mut self,
handler: Box<dyn CustomTaskHandler>,
)
pub fn register_custom_task_handler( &mut self, handler: Box<dyn CustomTaskHandler>, )
Registers a custom task handler
Sourcepub fn get_call_handler(&self, call_type: &str) -> Option<Arc<dyn CallHandler>>
pub fn get_call_handler(&self, call_type: &str) -> Option<Arc<dyn CallHandler>>
Looks up a call handler by type
Sourcepub fn get_run_handler(&self, run_type: &str) -> Option<Arc<dyn RunHandler>>
pub fn get_run_handler(&self, run_type: &str) -> Option<Arc<dyn RunHandler>>
Looks up a run handler by type
Sourcepub fn get_custom_task_handler(
&self,
task_type: &str,
) -> Option<Arc<dyn CustomTaskHandler>>
pub fn get_custom_task_handler( &self, task_type: &str, ) -> Option<Arc<dyn CustomTaskHandler>>
Looks up a custom task handler by task type
Trait Implementations§
Source§impl Clone for HandlerRegistry
impl Clone for HandlerRegistry
Source§fn clone(&self) -> HandlerRegistry
fn clone(&self) -> HandlerRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for HandlerRegistry
impl Default for HandlerRegistry
Source§fn default() -> HandlerRegistry
fn default() -> HandlerRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HandlerRegistry
impl !RefUnwindSafe for HandlerRegistry
impl Send for HandlerRegistry
impl Sync for HandlerRegistry
impl Unpin for HandlerRegistry
impl UnsafeUnpin for HandlerRegistry
impl !UnwindSafe for HandlerRegistry
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