#[non_exhaustive]pub enum CheckBucket {
Pass,
Fail,
Pending,
Skipping,
Cancel,
Unknown,
}Expand description
gh’s coarse categorisation of a CheckRun’s state — the field to branch on
when deciding whether CI passed. gh derives it from the raw state; this is
the typed form of its pass/fail/pending/skipping/cancel strings.
#[non_exhaustive] with an Unknown catch-all: a
bucket name a future gh introduces (or a missing field) deserialises to
Unknown rather than failing the parse, so the wrapper never breaks on an
unmodelled value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pass
The check succeeded.
Fail
The check failed.
Pending
The check is queued or still running.
Skipping
The check was skipped (e.g. a conditional job that didn’t run).
Cancel
The check was cancelled.
Unknown
A bucket gh reported that this version doesn’t model, or an absent field.
Implementations§
Source§impl CheckBucket
impl CheckBucket
Sourcepub fn is_failing(self) -> bool
pub fn is_failing(self) -> bool
Whether this bucket means the check failed or was cancelled — the states that should fail an aggregate CI verdict.
Sourcepub fn is_pending(self) -> bool
pub fn is_pending(self) -> bool
Whether this bucket means the check is still in flight (queued/running).
Sourcepub fn is_passing(self) -> bool
pub fn is_passing(self) -> bool
Whether this bucket means the check completed successfully.
Sourcepub fn is_unknown(self) -> bool
pub fn is_unknown(self) -> bool
Whether this is the Unknown catch-all — a bucket a
future gh introduced (or a missing field) that this version doesn’t model.
Distinct from Skipping: a skip is a deliberate,
terminal no-op, whereas an unknown bucket is unclassified and should be
treated conservatively (as “not known to be done”) by an aggregator.
Trait Implementations§
Source§impl Clone for CheckBucket
impl Clone for CheckBucket
Source§fn clone(&self) -> CheckBucket
fn clone(&self) -> CheckBucket
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CheckBucket
Source§impl Debug for CheckBucket
impl Debug for CheckBucket
Source§impl Default for CheckBucket
impl Default for CheckBucket
Source§fn default() -> CheckBucket
fn default() -> CheckBucket
Source§impl<'de> Deserialize<'de> for CheckBucket
impl<'de> Deserialize<'de> for CheckBucket
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 CheckBucket
Source§impl PartialEq for CheckBucket
impl PartialEq for CheckBucket
Source§fn eq(&self, other: &CheckBucket) -> bool
fn eq(&self, other: &CheckBucket) -> bool
self and other values to be equal, and is used by ==.