pub struct GateModelEntry {
pub declared: GateDecl,
pub inputs: Vec<String>,
}Expand description
use majordomus_cli::capability::builtin::gates::GateModelEntry;
use majordomus_cli::gates::GateDecl;
let decl: GateDecl = serde_json::from_value(serde_json::json!({
"id": "site-check",
"job": "site",
"runs": "scripts/site-check",
"summary": "the site is whole"
}))
.unwrap();
let entry = GateModelEntry { declared: decl, inputs: vec!["site/**".into()] };
// the declaration as the file carries it, plus the paths its evidence is taken over —
// derived from the classes that select it, never written down a second time
assert_eq!(entry.declared.id, "site-check");
assert_eq!(entry.inputs, ["site/**"]);One gate of the model, with what the model implies about it.
Fields§
§declared: GateDeclThe declaration as the file carries it.
inputs: Vec<String>The pathspecs a run of this gate is evidence over, derived from the classes that select it. A change to any of them makes a recorded run stale.
Trait Implementations§
Source§impl Clone for GateModelEntry
impl Clone for GateModelEntry
Source§fn clone(&self) -> GateModelEntry
fn clone(&self) -> GateModelEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GateModelEntry
impl Debug for GateModelEntry
Source§impl<'de> Deserialize<'de> for GateModelEntry
impl<'de> Deserialize<'de> for GateModelEntry
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for GateModelEntry
impl JsonSchema for GateModelEntry
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GateModelEntry
impl RefUnwindSafe for GateModelEntry
impl Send for GateModelEntry
impl Sync for GateModelEntry
impl Unpin for GateModelEntry
impl UnsafeUnpin for GateModelEntry
impl UnwindSafe for GateModelEntry
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
Mutably borrows from an owned value. Read more