pub struct QueueSelector {
pub task_ids: Vec<String>,
pub status: Option<QueueTaskStatus>,
pub target: Option<TargetTriple>,
pub crate_name: Option<CrateName>,
pub older_than_secs: Option<u64>,
pub limit: Option<u32>,
}Expand description
Selector for GET /api/v1/admin/queue and
POST /api/v1/admin/queue/{retry,cancel,promote,purge}.
One flat struct on purpose: the same shape has to decode from a JSON
body and from a query string, and a nested or #[serde(flatten)]ed
half forces serde to buffer the query’s values as strings, which no
numeric field can then deserialize from. So {"task_ids": […], "status": "failed"} and ?task_ids=a&task_ids=b&status=failed&limit=5
decode identically, and the mutation preview lists exactly the rows a
selector names.
Every predicate is optional; a selector with none of them selects every row (and is rejected for mutations — an operator mutation must name either explicit task ids or at least one predicate).
A non-empty task_ids selects exactly those rows and the predicates
are ignored; otherwise the predicates select. Either way the verb’s
own status/lane predicates still apply — a mutation never touches a
row outside its transition domain.
Fields§
§task_ids: Vec<String>Explicit task ids.
status: Option<QueueTaskStatus>Lifecycle status to match.
target: Option<TargetTriple>Compilation target to match.
crate_name: Option<CrateName>Crate name to match (crate on the wire).
older_than_secs: Option<u64>Only rows whose updated_at is at least this many seconds old
(older_than on the wire).
limit: Option<u32>Most rows a listing returns (bounded server-side); mutations ignore it — a mutation selector either matches everything its predicates describe or is rejected.
Trait Implementations§
Source§impl Clone for QueueSelector
impl Clone for QueueSelector
Source§impl ComposeSchema for QueueSelector
impl ComposeSchema for QueueSelector
Source§impl Debug for QueueSelector
impl Debug for QueueSelector
Source§impl Default for QueueSelector
impl Default for QueueSelector
Source§impl<'de> Deserialize<'de> for QueueSelector
impl<'de> Deserialize<'de> for QueueSelector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for QueueSelector
Source§impl PartialEq for QueueSelector
impl PartialEq for QueueSelector
Source§impl Serialize for QueueSelector
impl Serialize for QueueSelector
impl StructuralPartialEq for QueueSelector
Auto Trait Implementations§
impl Freeze for QueueSelector
impl RefUnwindSafe for QueueSelector
impl Send for QueueSelector
impl Sync for QueueSelector
impl Unpin for QueueSelector
impl UnsafeUnpin for QueueSelector
impl UnwindSafe for QueueSelector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.