pub struct Health {
pub reachable: bool,
pub detail: Option<String>,
}Expand description
Whether a source is answering right now.
§Placement is an open contract question
This type lives here because TaskSource::health returns it and the trait
lives here: placing it in onetaskgraph-core would make this crate depend on
the engine and invert the one direction the crate split exists to establish.
The approved contract enumerates this crate’s contents exhaustively and does
not name Health, so the enumeration and the trait as written cannot both
stand. Compiling forces the placement below; the resolution — add it to the
enumeration, or redesign health so no such type crosses the boundary —
belongs to the contract’s owner, not to this crate. See AGENTS.md.
Fields§
§reachable: boolWhether the source answered.
A bare bool beside an untyped detail cannot say that an unreachable source
must explain itself, or keep “reachable with a warning” apart from “reachable”;
an enum carrying the detail in its unreachable variant would.
detail: Option<String>What the source said, when it said anything useful.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Health
impl<'de> Deserialize<'de> for Health
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 Health
impl JsonSchema for Health
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