pub struct ShowWhen {
pub check: String,
pub is: Vec<CheckStatus>,
}Expand description
Dynamic display gate for a ClientHint — see
ClientHint::show_when. Shows the job only while the named check’s
latest status is one of is.
Fields§
§check: StringThe check: slug (a CheckHint::name)
whose latest status gates this job. May be defined by a different
manifest: checks are keyed by name in the agent’s snapshot, so a
standalone detector job and this one can share a slug. A check that
has never run (absent from the snapshot) does NOT match — the job
stays hidden until the detector first reports (fails closed, like
visible_to).
is: Vec<CheckStatus>The check status(es) in which the job is SHOWN. Accepts a single
status (is: fail) or a list (is: [fail, unknown]); both
deserialize to a Vec. The length(min = 1) schema constraint +
Manifest::validate both reject an empty set (it would match
nothing and silently hide the job) so schema-driven tooling and the
write path agree.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ShowWhen
impl<'de> Deserialize<'de> for ShowWhen
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>,
Source§impl JsonSchema for ShowWhen
impl JsonSchema for ShowWhen
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more