pub struct TasksResource { /* private fields */ }Expand description
Reads and waits for durable asynchronous tasks.
Implementations§
Source§impl TasksResource
impl TasksResource
Sourcepub async fn get(&self, task_id: &str) -> Result<JsonObject>
pub async fn get(&self, task_id: &str) -> Result<JsonObject>
Returns the latest durable task snapshot.
Sourcepub fn subscribe(&self, task_id: &str) -> EventStream
pub fn subscribe(&self, task_id: &str) -> EventStream
Streams durable task:update snapshots until the task is terminal.
Sourcepub async fn wait(
&self,
task_id: &str,
opts: TaskWaitOptions,
) -> Result<JsonObject>
pub async fn wait( &self, task_id: &str, opts: TaskWaitOptions, ) -> Result<JsonObject>
Waits for successful task completion. Failed, cancelled, and timed-out
tasks return Error::TaskFailed with the final durable snapshot.
Auto Trait Implementations§
impl !RefUnwindSafe for TasksResource
impl !UnwindSafe for TasksResource
impl Freeze for TasksResource
impl Send for TasksResource
impl Sync for TasksResource
impl Unpin for TasksResource
impl UnsafeUnpin for TasksResource
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