pub struct JobList {
pub page: JobPage,
pub total: Option<u64>,
pub shortened: Vec<u64>,
pub applied: Option<JobQuery>,
}Expand description
GET /v1/jobs: one page of jobs (ADR 0135). A JobPage with fields more, so a client that reads a JobPage
reads it too, and one that reads a JobList from an older daemon finds them absent.
Fields§
§page: JobPageThe jobs and, in the default order, next.
total: Option<u64>In any order but the default: how many jobs the filters admit, of which the page shows the first
(JobList::shown_words).
shortened: Vec<u64>The jobs whose name, workflow, branch, repository, URL or labels were longer than a list shows
(JOB_TEXT_MAX bytes each, JOB_LABELS_MAX bytes of labels) and are cut here; their own page has them
whole.
applied: Option<JobQuery>The query as the daemon read it, its limit and direction filled in; None from a daemon that predates
search and sorting, which ignored them (JobList::understood).
Implementations§
Source§impl JobList
impl JobList
Sourcepub fn understood(&self) -> bool
pub fn understood(&self) -> bool
Whether the daemon read the query’s search, sort and record filter: one older than them leaves out
applied, ignores them and lists every job, which a client says is not supported rather than a result.
Sourcepub fn unread_words(&self) -> Option<String>
pub fn unread_words(&self) -> Option<String>
What a client says above a list an older daemon answered without reading its search, sort or record filter:
that it cannot, and what the list is instead. None when the daemon read them.
Sourcepub fn shown_line(&self) -> Option<String>
pub fn shown_line(&self) -> Option<String>
JobList::shown_words as a client says it above the list, with what to do about the rest: 50 of 1234 jobs, longest wait first; a search or the filters narrow it.
Sourcepub fn none_words() -> &'static str
pub fn none_words() -> &'static str
What a client says of a page with no jobs.
Sourcepub fn shown_words(&self) -> Option<String>
pub fn shown_words(&self) -> Option<String>
What a sorted page shows of its list when it is not all of it: 50 of 1234 jobs, longest wait first.
None in the default order, which pages, and when the page holds every job.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobList
impl<'de> Deserialize<'de> for JobList
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 JobList
impl StructuralPartialEq for JobList
Auto Trait Implementations§
impl Forget for JobList
impl Freeze for JobList
impl Move for JobList
impl RefUnwindSafe for JobList
impl Send for JobList
impl Sync for JobList
impl Unpin for JobList
impl UnsafeUnpin for JobList
impl UnwindSafe for JobList
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.