pub struct SkillStatus {Show 15 fields
pub id: String,
pub uri: String,
pub title: String,
pub description: String,
pub status: String,
pub version: u64,
pub path: String,
pub provenance: Option<SkillProvenance>,
pub valid: bool,
pub tested: SkillTested,
pub documented: SkillDocumented,
pub enforced: SkillEnforced,
pub used: SkillUsed,
pub standing: SkillStanding,
pub findings: Vec<SkillFinding>,
}Expand description
One skill with everything derived about it.
use majordomus_cli::skill::SkillStatus;
// every fact is always present in the answer, so a client never has to tell "absent"
// from "false"; only the provenance is optional
let schema = serde_json::to_value(schemars::schema_for!(SkillStatus)).unwrap();
let required = schema["required"].as_array().unwrap();
for field in ["id", "valid", "tested", "documented", "enforced", "used", "standing"] {
assert!(required.iter().any(|f| f == field), "{field}");
}
assert!(!required.iter().any(|f| f == "provenance"));Fields§
§id: StringThe skill’s id, which is its directory name.
uri: Stringmajordomus://skill/<id>.
title: StringThe title as authored.
description: StringThe description as authored.
status: StringThe lifecycle status as authored: draft, active or deprecated; unknown for a
file the index refused.
version: u64The version as authored.
path: StringThe file, repository-relative.
provenance: Option<SkillProvenance>Where it came from, when it declares that.
valid: boolWhether the file satisfies the skill contract, as the index judged it.
tested: SkillTestedThe tested fact.
documented: SkillDocumentedThe documented fact.
enforced: SkillEnforcedThe enforced fact.
used: SkillUsedThe used fact.
standing: SkillStandingWhere it stands, derived from the four.
findings: Vec<SkillFinding>The findings about this skill.
Trait Implementations§
Source§impl Clone for SkillStatus
impl Clone for SkillStatus
Source§fn clone(&self) -> SkillStatus
fn clone(&self) -> SkillStatus
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 SkillStatus
impl Debug for SkillStatus
Source§impl<'de> Deserialize<'de> for SkillStatus
impl<'de> Deserialize<'de> for SkillStatus
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
impl Eq for SkillStatus
Source§impl JsonSchema for SkillStatus
impl JsonSchema for SkillStatus
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 moreSource§impl PartialEq for SkillStatus
impl PartialEq for SkillStatus
Source§fn eq(&self, other: &SkillStatus) -> bool
fn eq(&self, other: &SkillStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SkillStatus
impl Serialize for SkillStatus
impl StructuralPartialEq for SkillStatus
Auto Trait Implementations§
impl Freeze for SkillStatus
impl RefUnwindSafe for SkillStatus
impl Send for SkillStatus
impl Sync for SkillStatus
impl Unpin for SkillStatus
impl UnsafeUnpin for SkillStatus
impl UnwindSafe for SkillStatus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.