pub struct TaskFilter {
pub status: Option<TaskStatus>,
pub task_type: Option<TaskType>,
pub priority: Option<TaskPriority>,
pub agent_id: Option<String>,
pub assignee: Option<String>,
pub parent_id: Option<TaskId>,
pub tag: Option<String>,
pub include_deleted: bool,
pub limit: usize,
}Expand description
Filter for listing tasks.
All fields are optional — None means “don’t filter on this field”.
§Example
use pe_tasks::registry::TaskFilter;
use pe_tasks::TaskStatus;
let filter = TaskFilter::default().with_status(TaskStatus::Pending).with_limit(10);Fields§
§status: Option<TaskStatus>§task_type: Option<TaskType>§priority: Option<TaskPriority>§agent_id: Option<String>§assignee: Option<String>§parent_id: Option<TaskId>§tag: Option<String>§include_deleted: bool§limit: usizeImplementations§
Source§impl TaskFilter
impl TaskFilter
Sourcepub fn with_status(self, status: TaskStatus) -> Self
pub fn with_status(self, status: TaskStatus) -> Self
Builder: filter by status.
Sourcepub fn with_task_type(self, tt: TaskType) -> Self
pub fn with_task_type(self, tt: TaskType) -> Self
Builder: filter by task type.
Sourcepub fn with_priority(self, priority: TaskPriority) -> Self
pub fn with_priority(self, priority: TaskPriority) -> Self
Builder: filter by priority.
Sourcepub fn with_agent(self, agent_id: impl Into<String>) -> Self
pub fn with_agent(self, agent_id: impl Into<String>) -> Self
Builder: filter by agent.
Sourcepub fn with_assignee(self, assignee: impl Into<String>) -> Self
pub fn with_assignee(self, assignee: impl Into<String>) -> Self
Builder: filter by assignee.
Sourcepub fn with_parent(self, parent_id: impl Into<TaskId>) -> Self
pub fn with_parent(self, parent_id: impl Into<TaskId>) -> Self
Builder: filter by parent.
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Builder: set result limit.
Sourcepub fn including_deleted(self) -> Self
pub fn including_deleted(self) -> Self
Builder: include deleted tasks.
Trait Implementations§
Source§impl Clone for TaskFilter
impl Clone for TaskFilter
Source§fn clone(&self) -> TaskFilter
fn clone(&self) -> TaskFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaskFilter
impl Debug for TaskFilter
Source§impl Default for TaskFilter
impl Default for TaskFilter
Source§fn default() -> TaskFilter
fn default() -> TaskFilter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TaskFilter
impl RefUnwindSafe for TaskFilter
impl Send for TaskFilter
impl Sync for TaskFilter
impl Unpin for TaskFilter
impl UnsafeUnpin for TaskFilter
impl UnwindSafe for TaskFilter
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