pub struct TaskQuery {
pub status: Option<TaskStatus>,
pub kind: Option<String>,
pub parent_id: Option<Uuid>,
pub root_only: bool,
pub name: Option<String>,
pub queue_name: Option<String>,
pub sort: TaskSort,
pub limit: Option<u64>,
pub offset: Option<u64>,
}Expand description
Builder for filtering, sorting, and paginating task queries.
ⓘ
let query = TaskQuery::default()
.status(TaskStatus::Running)
.kind("WORKFLOW")
.root_only(true)
.sort(TaskSort::CreatedAt(Order::Desc))
.limit(20);
let tasks = Ctx::list(&db, query).await?;Fields§
§status: Option<TaskStatus>§kind: Option<String>§parent_id: Option<Uuid>§root_only: bool§name: Option<String>§queue_name: Option<String>§sort: TaskSort§limit: Option<u64>§offset: Option<u64>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskQuery
impl RefUnwindSafe for TaskQuery
impl Send for TaskQuery
impl Sync for TaskQuery
impl Unpin for TaskQuery
impl UnsafeUnpin for TaskQuery
impl UnwindSafe for TaskQuery
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more