pub struct DomainMember {
pub id: String,
pub label: String,
pub title: String,
pub headline: String,
pub route: String,
pub featured: bool,
pub surfaces: Surfaces,
pub claims: usize,
pub tested: usize,
pub use_cases: usize,
}Expand description
One stable feature of a domain, as a card shows it.
use majordomus_cli::product::{DomainMember, Surfaces};
let m = DomainMember {
id: "finish-contract".into(),
label: "Finish contract".into(),
title: "Done is a contract".into(),
headline: "A worker does not define its own completion.".into(),
route: "/features/finish-contract/".into(),
featured: true,
surfaces: Surfaces::default(),
claims: 3,
tested: 2,
use_cases: 1,
};
let v = serde_json::to_value(&m).unwrap();
assert_eq!(v["tested"], 2);
assert_eq!(v["surfaces"]["cli"], false);Fields§
§id: StringThe feature id.
label: StringThe name a narrow column shows: the short title, or the title.
title: StringThe feature as a heading.
headline: StringThe feature’s promise.
route: String/features/<id>/.
featured: boolWhether the homepage shows it as a chapter.
surfaces: SurfacesThe interfaces it is exposed through.
claims: usizeHow many claims it names.
tested: usizeHow many of them are guaranteed and name the test that settles them.
use_cases: usizeHow many use cases show it in use.
Trait Implementations§
Source§impl Clone for DomainMember
impl Clone for DomainMember
Source§fn clone(&self) -> DomainMember
fn clone(&self) -> DomainMember
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 DomainMember
impl Debug for DomainMember
Source§impl<'de> Deserialize<'de> for DomainMember
impl<'de> Deserialize<'de> for DomainMember
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 DomainMember
Source§impl JsonSchema for DomainMember
impl JsonSchema for DomainMember
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 DomainMember
impl PartialEq for DomainMember
Source§fn eq(&self, other: &DomainMember) -> bool
fn eq(&self, other: &DomainMember) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DomainMember
impl Serialize for DomainMember
impl StructuralPartialEq for DomainMember
Auto Trait Implementations§
impl Freeze for DomainMember
impl RefUnwindSafe for DomainMember
impl Send for DomainMember
impl Sync for DomainMember
impl Unpin for DomainMember
impl UnsafeUnpin for DomainMember
impl UnwindSafe for DomainMember
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.