pub struct ResolvedDomain {
pub domain: Domain,
pub features: Vec<DomainMember>,
pub surfaces: Surfaces,
pub moments: Vec<MomentRef>,
pub claim_refs: Vec<ClaimRef>,
pub use_case_refs: Vec<UseCaseRef>,
pub counts: DomainCounts,
pub evidence: FeatureEvidence,
}Expand description
One domain, resolved: the record as its file declares it, and everything derived from the stable features that name it.
The declared record is flattened, so a reader sees one object: the domain’s own fields beside its derived members and counts.
use majordomus_cli::product::{Domain, DomainCounts, FeatureEvidence, ResolvedDomain, Surfaces};
let domain: Domain = serde_json::from_value(serde_json::json!({
"id": "context", "title": "Context", "status": "stable",
"headline": "h", "problem": "p",
}))
.unwrap();
let resolved = ResolvedDomain {
domain,
features: vec![],
surfaces: Surfaces::default(),
moments: vec![],
claim_refs: vec![],
use_case_refs: vec![],
counts: DomainCounts::default(),
evidence: FeatureEvidence::default(),
};
let v = serde_json::to_value(&resolved).unwrap();
assert_eq!(v["id"], "context", "the record is flattened into the resolved view");
assert_eq!(v["counts"]["features"], 0);Fields§
§domain: DomainThe record as its file declares it, plus its route and source.
features: Vec<DomainMember>Derived: the stable features that name it, in presentation order.
surfaces: SurfacesDerived: the interfaces any of its features is exposed through.
moments: Vec<MomentRef>Derived: the operational moments its features answer, in the catalogue’s order.
claim_refs: Vec<ClaimRef>Derived: the distinct claims its features name, with their status and test.
use_case_refs: Vec<UseCaseRef>Derived: the distinct use cases its features name.
counts: DomainCountsDerived: how much stands behind it.
evidence: FeatureEvidenceDerived: what is guaranteed, by claim status.
Trait Implementations§
Source§impl Clone for ResolvedDomain
impl Clone for ResolvedDomain
Source§fn clone(&self) -> ResolvedDomain
fn clone(&self) -> ResolvedDomain
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 ResolvedDomain
impl Debug for ResolvedDomain
Source§impl<'de> Deserialize<'de> for ResolvedDomain
impl<'de> Deserialize<'de> for ResolvedDomain
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 ResolvedDomain
Source§impl JsonSchema for ResolvedDomain
impl JsonSchema for ResolvedDomain
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 ResolvedDomain
impl PartialEq for ResolvedDomain
Source§fn eq(&self, other: &ResolvedDomain) -> bool
fn eq(&self, other: &ResolvedDomain) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResolvedDomain
impl Serialize for ResolvedDomain
impl StructuralPartialEq for ResolvedDomain
Auto Trait Implementations§
impl Freeze for ResolvedDomain
impl RefUnwindSafe for ResolvedDomain
impl Send for ResolvedDomain
impl Sync for ResolvedDomain
impl Unpin for ResolvedDomain
impl UnsafeUnpin for ResolvedDomain
impl UnwindSafe for ResolvedDomain
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.