pub struct JobQuery {Show 15 fields
pub repository: Option<String>,
pub state: Option<JobState>,
pub conclusion: Option<String>,
pub workflow: Option<String>,
pub name: Option<String>,
pub since: Option<u64>,
pub until: Option<u64>,
pub before: Option<u64>,
pub limit: Option<u32>,
pub q: Option<String>,
pub branch: Option<String>,
pub record: Option<RecordFilter>,
pub sort: Option<JobSort>,
pub order: Option<SortOrder>,
pub cursor: Option<String>,
}Expand description
GET /v1/jobs query parameters. Jobs come newest first (by ID, which grows with time), or by sort (ADR 0135).
JobQuery::check says which queries the daemon refuses.
Fields§
§repository: Option<String>Only this owner/name.
state: Option<JobState>Only jobs in this state.
conclusion: Option<String>Only jobs with this conclusion, such as failure.
workflow: Option<String>Only jobs of the workflow with this name, such as CI.
name: Option<String>Only jobs with this name in their workflow, such as build.
since: Option<u64>Only jobs queued at or after this time.
until: Option<u64>Only jobs queued before this time.
before: Option<u64>Only jobs with a smaller ID: the next of the previous page. Only in the default order, newest first.
limit: Option<u32>At most this many jobs; default 50, at most 500. A page also ends once it holds
JOBS_PAGE_BYTES of text.
q: Option<String>Only jobs whose name, workflow or branch holds this text, as written: 1 to JOB_SEARCH_MAX bytes, ASCII
letters in either case. The history keeps no commit, so a commit is not searched.
branch: Option<String>Only jobs of runs for this branch.
record: Option<RecordFilter>Only jobs whose record this says became of.
sort: Option<JobSort>Sort by this; a job whose figure is unknown comes last either way, ties by ID. queued, newest first, is
the default order, which pages with before; any other order is one page, the first limit jobs.
order: Option<SortOrder>Which way; default largest or latest first.
cursor: Option<String>Refused: a sorted list is one page, which a search or the filters narrow. Read only to say so.
Implementations§
Source§impl JobQuery
impl JobQuery
Sourcepub fn check(&self) -> Result<(), String>
pub fn check(&self) -> Result<(), String>
Checks a query before it is read: a search of 1 to JOB_SEARCH_MAX bytes without control characters,
before only in the default order, and no cursor. Returns the reason to refuse it, worded for its user.
Sourcepub fn pages(&self) -> bool
pub fn pages(&self) -> bool
Whether it lists in the default order, newest first by ID, the one order that pages, with before and
next.
Sourcepub fn page_size(&self) -> u32
pub fn page_size(&self) -> u32
How many jobs a page holds: limit, within 1 and JOBS_PAGE_MAX.
Sourcepub fn admits(&self, job: &JobSummary) -> bool
pub fn admits(&self, job: &JobSummary) -> bool
Whether job passes its filters: not its paging.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobQuery
impl<'de> Deserialize<'de> for JobQuery
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 JobQuery
impl StructuralPartialEq for JobQuery
Auto Trait Implementations§
impl Forget for JobQuery
impl Freeze for JobQuery
impl Move for JobQuery
impl RefUnwindSafe for JobQuery
impl Send for JobQuery
impl Sync for JobQuery
impl Unpin for JobQuery
impl UnsafeUnpin for JobQuery
impl UnwindSafe for JobQuery
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.