pub struct Worker { /* private fields */ }Implementations§
Source§impl Worker
impl Worker
pub fn new(client: Client, task_queue: impl Into<String>) -> Self
pub fn worker_id(self, worker_id: impl Into<String>) -> Self
pub fn poll_timeout(self, timeout: Duration) -> Self
pub fn heartbeat_interval(self, interval: Duration) -> Self
pub fn on_worker_heartbeat<F>(self, observer: F) -> Self
pub fn max_concurrent_workflow_tasks(self, count: usize) -> Self
pub fn max_concurrent_activity_tasks(self, count: usize) -> Self
pub fn register_workflow<F, Fut>( &mut self, workflow_type: impl Into<String>, handler: F, )
pub fn register_activity<F, Fut>( &mut self, activity_type: impl Into<String>, handler: F, )
pub async fn register(&self) -> Result<RegisterWorkerResponse>
pub async fn run(&self) -> Result<()>
pub async fn run_until<F>(&self, shutdown: F) -> Result<()>
pub async fn run_once(&self) -> Result<usize>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Worker
impl !RefUnwindSafe for Worker
impl Send for Worker
impl Sync for Worker
impl Unpin for Worker
impl !UnwindSafe for Worker
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