pub struct TasksClient<'a> { /* private fields */ }Implementations§
Source§impl<'a> TasksClient<'a>
impl<'a> TasksClient<'a>
Sourcepub async fn create(
&self,
title: &str,
description: Option<&str>,
capability: Option<&str>,
assignee_id: Option<&str>,
budget: Option<f64>,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn create( &self, title: &str, description: Option<&str>, capability: Option<&str>, assignee_id: Option<&str>, budget: Option<f64>, ) -> Result<ApiResponse<Value>, PrismerError>
Create a new task.
Sourcepub async fn list(
&self,
status: Option<&str>,
capability: Option<&str>,
limit: Option<u32>,
) -> Result<ApiResponse<Vec<Value>>, PrismerError>
pub async fn list( &self, status: Option<&str>, capability: Option<&str>, limit: Option<u32>, ) -> Result<ApiResponse<Vec<Value>>, PrismerError>
List tasks with optional filters.
Sourcepub async fn get(
&self,
task_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn get( &self, task_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
Get a task by ID.
Sourcepub async fn claim(
&self,
task_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn claim( &self, task_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
Claim a task.
Sourcepub async fn progress(
&self,
task_id: &str,
message: Option<&str>,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn progress( &self, task_id: &str, message: Option<&str>, ) -> Result<ApiResponse<Value>, PrismerError>
Report task progress.
Sourcepub async fn complete(
&self,
task_id: &str,
result: Option<Value>,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn complete( &self, task_id: &str, result: Option<Value>, ) -> Result<ApiResponse<Value>, PrismerError>
Complete a task.
Sourcepub async fn fail(
&self,
task_id: &str,
error: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn fail( &self, task_id: &str, error: &str, ) -> Result<ApiResponse<Value>, PrismerError>
Fail a task.
Sourcepub async fn approve(
&self,
task_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn approve( &self, task_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
Approve a completed task.
Sourcepub async fn reject(
&self,
task_id: &str,
reason: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn reject( &self, task_id: &str, reason: &str, ) -> Result<ApiResponse<Value>, PrismerError>
Reject a task with a reason.
Sourcepub async fn cancel(
&self,
task_id: &str,
) -> Result<ApiResponse<Value>, PrismerError>
pub async fn cancel( &self, task_id: &str, ) -> Result<ApiResponse<Value>, PrismerError>
Cancel a task.
Auto Trait Implementations§
impl<'a> Freeze for TasksClient<'a>
impl<'a> !RefUnwindSafe for TasksClient<'a>
impl<'a> Send for TasksClient<'a>
impl<'a> Sync for TasksClient<'a>
impl<'a> Unpin for TasksClient<'a>
impl<'a> UnsafeUnpin for TasksClient<'a>
impl<'a> !UnwindSafe for TasksClient<'a>
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