capability-full-annotated-leaf-holders 0.1.0

A Rust crate for crafting fully annotated leaf holders mimicking detailed domain observations, using advanced serialization and error management.
Documentation
// ---------------- [ File: capability-full-annotated-leaf-holders/src/grower_full_annotated_leaf_holders.rs ]
crate::ix!();

/// To create this structure, we consider the topology of our model and create for each
/// LeafHolder *leaf* a textual descriptor which reads like a handwritten observation taken by
/// a practitioner in the domain.
/// 
/// For example, a note-taking observer may be recording notes while studying the model out in
/// the field. 
/// 
#[derive(Hash,SaveLoad,AiJsonTemplate,Debug, Clone, PartialEq, Eq, Builder, Getters, Setters, Serialize, Deserialize)]
#[builder(setter(into))]
#[getset(get = "pub", set = "pub")]
pub struct AnnotatedLeafHolderExpansions {

    /// This field holds *verbatim* the lower-kebab-case target-name belonging to the tree grow process.
    #[builder(default = "\"target\".to_string()")]
    #[serde(default)]
    target_name: String,

    /// Each key in this map is the name of a LeafHolder.
    /// Each value in this map is a vector of AnnotatedLeaves belonging to this LeafHolder
    annotated_leaf_holders: Vec<AnnotatedLeafHolderNode>,
}

#[derive(Hash,PartialEq,Eq,SaveLoad,AiJsonTemplate,Serialize,Deserialize,Getters,Setters,Builder,Debug,Clone)]
#[getset(get = "pub", set = "pub")]
pub struct AnnotatedLeafHolderNode {

    /// This name comes directly from the `StringSkeleton` model.
    ///
    /// It should always be specified as an UpperCamelCase identifier.
    ///
    leaf_holder_name: LeafHolderName,

    annotated_leaves: Vec<AnnotatedLeaf>,
}

/// Each AnnotatedLeaf specifies clearly a leaf in our domain model tree.
///
#[derive(Hash,SaveLoad,AiJsonTemplate,Debug,Clone,PartialEq,Eq,Builder,Getters,Setters,Serialize,Deserialize)]
#[builder(setter(into))]
#[getset(get = "pub", set = "pub")]
pub struct AnnotatedLeaf {

    /// Each LeafName must be UpperCamelCase containing no punctuation and no spaces.
    ///
    leaf_name: LeafName,

    /// To generate each descriptor, follow the pattern specified above. Keep it terse but be
    /// descriptive. Write from the perspective of an apex observer studying the target domain.
    ///
    /// Each generated descriptor should be terse and useful. 
    ///
    /// Do not generate any flowery language whatsoever.
    ///
    /// Remember that there also should not be any meta-language here such as "A handwritten notebook
    /// observation:" or "A practitioner's note:".
    leaf_descriptor: LeafDescriptor,
}