pub struct JobSummary {Show 15 fields
pub id: u64,
pub repository: String,
pub run_id: u64,
pub run_attempt: u32,
pub workflow: Option<String>,
pub name: String,
pub branch: Option<String>,
pub url: Option<String>,
pub labels: Vec<String>,
pub state: JobState,
pub conclusion: Option<String>,
pub runner: Option<JobRunner>,
pub timeline: Timeline,
pub metrics: JobMetrics,
pub log: LogSummary,
}Expand description
A job without its steps: what lists and events carry.
Fields§
§id: u64GitHub’s job ID, also its check run ID.
repository: Stringowner/name on GitHub.
run_id: u64The workflow run it belongs to.
run_attempt: u321 for the first attempt of the run, higher for re-runs.
workflow: Option<String>The workflow’s name.
name: StringThe job’s name in the workflow.
branch: Option<String>The branch the run is for.
url: Option<String>The job’s page on GitHub.
labels: Vec<String>The workflow’s runs-on labels.
state: JobStateWhere the job is.
conclusion: Option<String>GitHub’s conclusion once completed: success, failure, cancelled, skipped, timed_out, ….
runner: Option<JobRunner>The runner that ran it.
timeline: TimelineWhen each phase started.
metrics: JobMetricsCPU, memory and network use while it ran.
log: LogSummaryHow much of its log is stored.
Implementations§
Source§impl JobSummary
impl JobSummary
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Whether it failed, as GET /v1/stats counts failures: it concluded failure or timed_out, or it lost its
runner. A job another machine ran is not this daemon’s to count.
Sourcepub fn outcome(&self) -> Outcome
pub fn outcome(&self) -> Outcome
Its outcome: where it is while it can change, then how it ended. Its kind is OutcomeKind::Failed exactly
when it failed.
Sourcepub fn waited(&self, now: u64) -> Option<u64>
pub fn waited(&self, now: u64) -> Option<u64>
Seconds it waited for a runner: until it started, or until now while it may still start. None for a job
that ended without starting here.
Sourcepub fn ran(&self, now: u64) -> Option<u64>
pub fn ran(&self, now: u64) -> Option<u64>
Seconds it ran: until it finished, or until now while it may still finish. None before it started, and
for a final job without a finish time, which no client claims ran for as long as it has been since.
Sourcepub fn phases(&self) -> Vec<Phase>
pub fn phases(&self) -> Vec<Phase>
Its phases in order, each from when it began to when it ended, None while it goes on. A phase without an
end goes on while the job can change; a final job’s ends when the job finished, or is left out when no time
says how long it took. Cleaning up follows the finish of a job whose runner started here, until its cleanup.
Trait Implementations§
Source§impl Clone for JobSummary
impl Clone for JobSummary
Source§impl Debug for JobSummary
impl Debug for JobSummary
Source§impl<'de> Deserialize<'de> for JobSummary
impl<'de> Deserialize<'de> for JobSummary
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 JobSummary
Source§impl PartialEq for JobSummary
impl PartialEq for JobSummary
Source§impl Serialize for JobSummary
impl Serialize for JobSummary
impl StructuralPartialEq for JobSummary
Auto Trait Implementations§
impl Freeze for JobSummary
impl RefUnwindSafe for JobSummary
impl Send for JobSummary
impl Sync for JobSummary
impl Unpin for JobSummary
impl UnsafeUnpin for JobSummary
impl UnwindSafe for JobSummary
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.