pub struct Dispatcher { /* private fields */ }Expand description
Central task dispatcher. Manages worker connections and routes tasks.
Implementations§
Source§impl Dispatcher
impl Dispatcher
pub fn builder() -> DispatcherBuilder
pub async fn start(&self) -> Result<(), DispatchError>
Sourcepub async fn stop(&self)
pub async fn stop(&self)
Gracefully stops the dispatcher. Cancels background tasks and shuts down transport.
pub async fn dispatch( &self, task: Task, ) -> Result<DispatchResult, DispatchError>
pub fn pool_stats(&self) -> PoolStats
Auto Trait Implementations§
impl !Freeze for Dispatcher
impl !RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnsafeUnpin for Dispatcher
impl !UnwindSafe for Dispatcher
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