pub struct ClaimedArtifact {
pub field: String,
pub path: String,
pub present: bool,
}Expand description
One executable artefact an object names, and whether the tree holds it.
field is kept beside the path because the same object can name artefacts under several
keys, and a reader fixing a dangling one needs to know which line of the front matter to
look at rather than which file is missing.
use majordomus_cli::capability::builtin::entity::ClaimedArtifact;
let a = ClaimedArtifact {
field: "x-majordomus.tests".into(),
path: "test/cases/277_entities_are_routable.sh".into(),
present: true,
};
let wire = serde_json::to_value(&a).unwrap();
assert_eq!(wire["field"], serde_json::json!("x-majordomus.tests"));
assert_eq!(wire["present"], serde_json::json!(true));Fields§
§field: StringThe front matter key it was named under (x-majordomus.tests, test, …).
path: StringThe repository-relative path as named.
present: boolWhether the tree holds it.
Trait Implementations§
Source§impl Clone for ClaimedArtifact
impl Clone for ClaimedArtifact
Source§fn clone(&self) -> ClaimedArtifact
fn clone(&self) -> ClaimedArtifact
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 ClaimedArtifact
impl Debug for ClaimedArtifact
Source§impl<'de> Deserialize<'de> for ClaimedArtifact
impl<'de> Deserialize<'de> for ClaimedArtifact
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 ClaimedArtifact
Source§impl JsonSchema for ClaimedArtifact
impl JsonSchema for ClaimedArtifact
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 ClaimedArtifact
impl PartialEq for ClaimedArtifact
Source§fn eq(&self, other: &ClaimedArtifact) -> bool
fn eq(&self, other: &ClaimedArtifact) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ClaimedArtifact
impl Serialize for ClaimedArtifact
impl StructuralPartialEq for ClaimedArtifact
Auto Trait Implementations§
impl Freeze for ClaimedArtifact
impl RefUnwindSafe for ClaimedArtifact
impl Send for ClaimedArtifact
impl Sync for ClaimedArtifact
impl Unpin for ClaimedArtifact
impl UnsafeUnpin for ClaimedArtifact
impl UnwindSafe for ClaimedArtifact
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.