pub struct DispatchContext { /* private fields */ }Expand description
Dependencies used by activity dispatch.
Implementations§
Source§impl DispatchContext
impl DispatchContext
Sourcepub fn new(
workflow_id: impl Into<String>,
worker_pool: Arc<dyn DispatchWorkerPool>,
router: Arc<dyn DispatchRouter>,
conversations: Arc<dyn DispatchConversationFactory>,
recorder: Arc<dyn DispatchRecorder>,
ids: Arc<dyn ConversationIdProvider>,
) -> Self
pub fn new( workflow_id: impl Into<String>, worker_pool: Arc<dyn DispatchWorkerPool>, router: Arc<dyn DispatchRouter>, conversations: Arc<dyn DispatchConversationFactory>, recorder: Arc<dyn DispatchRecorder>, ids: Arc<dyn ConversationIdProvider>, ) -> Self
Creates a dispatch context from explicit integration dependencies.
Sourcepub fn embedded_no_workers(workflow_id: impl Into<String>) -> Self
pub fn embedded_no_workers(workflow_id: impl Into<String>) -> Self
Creates an embedded in-process context with no registered workers yet.
Trait Implementations§
Source§impl Clone for DispatchContext
impl Clone for DispatchContext
Source§fn clone(&self) -> DispatchContext
fn clone(&self) -> DispatchContext
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 Debug for DispatchContext
impl Debug for DispatchContext
Auto Trait Implementations§
impl !RefUnwindSafe for DispatchContext
impl !UnwindSafe for DispatchContext
impl Freeze for DispatchContext
impl Send for DispatchContext
impl Sync for DispatchContext
impl Unpin for DispatchContext
impl UnsafeUnpin for DispatchContext
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