pub struct KnowledgeMap {
pub schema_version: u16,
pub map_version: u64,
pub updated_at: String,
pub topics: Vec<KnowledgeMapTopic>,
pub sources: Vec<KnowledgeMapSource>,
pub routes: Vec<KnowledgeMapRoute>,
pub history: Vec<KnowledgeMapHistoryEntry>,
}Expand description
Assembled inline map used by domain workflows and API responses.
Fields§
§schema_version: u16§map_version: u64§updated_at: String§topics: Vec<KnowledgeMapTopic>§sources: Vec<KnowledgeMapSource>§routes: Vec<KnowledgeMapRoute>§history: Vec<KnowledgeMapHistoryEntry>Implementations§
Source§impl KnowledgeMap
impl KnowledgeMap
Sourcepub const SCHEMA_VERSION: u16 = 1
pub const SCHEMA_VERSION: u16 = 1
Schema identity for the assembled, inline map representation.
Sourcepub fn initial(updated_at: String) -> Self
pub fn initial(updated_at: String) -> Self
Creates the default shared contract with software and authored business routes.
Sourcepub fn ensure_software_model_route(&mut self) -> Result<bool, DomainError>
pub fn ensure_software_model_route(&mut self) -> Result<bool, DomainError>
Ensures the stable repository entry used to discover code-derived software models.
Sourcepub fn ensure_business_knowledge_route(&mut self) -> Result<bool, DomainError>
pub fn ensure_business_knowledge_route(&mut self) -> Result<bool, DomainError>
Ensures the stable authored repository glossary route.
Sourcepub fn validate(&self) -> Result<(), DomainError>
pub fn validate(&self) -> Result<(), DomainError>
Validates the cross-reference invariants that keep the map navigable.
Sourcepub fn add_source(
&mut self,
source: KnowledgeMapSource,
) -> Result<(), DomainError>
pub fn add_source( &mut self, source: KnowledgeMapSource, ) -> Result<(), DomainError>
Adds a source to the map and creates a simple route for its topic when missing.
Sourcepub fn update_source(
&mut self,
change: KnowledgeMapChange,
) -> Result<(), DomainError>
pub fn update_source( &mut self, change: KnowledgeMapChange, ) -> Result<(), DomainError>
Applies supported source field updates without changing its identity.
Sourcepub fn remove_source(&mut self, id: &str) -> Result<(), DomainError>
pub fn remove_source(&mut self, id: &str) -> Result<(), DomainError>
Removes a source and prunes routes that referenced it.
Sourcepub fn record_change(
&mut self,
action: &str,
summary: String,
updated_at: String,
)
pub fn record_change( &mut self, action: &str, summary: String, updated_at: String, )
Advances the map version and records the mutation in history.
Trait Implementations§
Source§impl Clone for KnowledgeMap
impl Clone for KnowledgeMap
Source§fn clone(&self) -> KnowledgeMap
fn clone(&self) -> KnowledgeMap
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 KnowledgeMap
impl Debug for KnowledgeMap
Source§impl<'de> Deserialize<'de> for KnowledgeMap
impl<'de> Deserialize<'de> for KnowledgeMap
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 KnowledgeMap
Source§impl PartialEq for KnowledgeMap
impl PartialEq for KnowledgeMap
Source§impl Serialize for KnowledgeMap
impl Serialize for KnowledgeMap
impl StructuralPartialEq for KnowledgeMap
Auto Trait Implementations§
impl Freeze for KnowledgeMap
impl RefUnwindSafe for KnowledgeMap
impl Send for KnowledgeMap
impl Sync for KnowledgeMap
impl Unpin for KnowledgeMap
impl UnsafeUnpin for KnowledgeMap
impl UnwindSafe for KnowledgeMap
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.