pub struct KnowledgeGraph { /* private fields */ }Expand description
Knowledge graph containing all stack components and their relationships
Implementations§
Source§impl KnowledgeGraph
impl KnowledgeGraph
Sourcepub fn new() -> KnowledgeGraph
pub fn new() -> KnowledgeGraph
Create a new empty knowledge graph
Sourcepub fn sovereign_stack() -> KnowledgeGraph
pub fn sovereign_stack() -> KnowledgeGraph
Create a knowledge graph pre-populated with the Sovereign AI Stack
Sourcepub fn register_component(&mut self, component: StackComponent)
pub fn register_component(&mut self, component: StackComponent)
Register a component and update indices
Sourcepub fn get_component(&self, name: &str) -> Option<&StackComponent>
pub fn get_component(&self, name: &str) -> Option<&StackComponent>
Get a component by name
Sourcepub fn components(&self) -> impl Iterator<Item = &StackComponent>
pub fn components(&self) -> impl Iterator<Item = &StackComponent>
Get all components
Sourcepub fn component_names(&self) -> impl Iterator<Item = &String>
pub fn component_names(&self) -> impl Iterator<Item = &String>
Get all component names
Sourcepub fn components_in_layer(&self, layer: StackLayer) -> Vec<&StackComponent>
pub fn components_in_layer(&self, layer: StackLayer) -> Vec<&StackComponent>
Get components in a specific layer
Sourcepub fn find_by_capability(&self, capability: &str) -> Vec<&StackComponent>
pub fn find_by_capability(&self, capability: &str) -> Vec<&StackComponent>
Find components with a specific capability
Sourcepub fn find_by_domain(&self, domain: ProblemDomain) -> Vec<&StackComponent>
pub fn find_by_domain(&self, domain: ProblemDomain) -> Vec<&StackComponent>
Find components for a problem domain
Sourcepub fn integrations_from(&self, component: &str) -> Vec<&IntegrationPattern>
pub fn integrations_from(&self, component: &str) -> Vec<&IntegrationPattern>
Get integration patterns from a component
Sourcepub fn integrations_to(&self, component: &str) -> Vec<&IntegrationPattern>
pub fn integrations_to(&self, component: &str) -> Vec<&IntegrationPattern>
Get integration patterns to a component
Sourcepub fn get_integration(
&self,
from: &str,
to: &str,
) -> Option<&IntegrationPattern>
pub fn get_integration( &self, from: &str, to: &str, ) -> Option<&IntegrationPattern>
Get integration pattern between two components
Sourcepub fn all_capabilities(&self) -> impl Iterator<Item = &String>
pub fn all_capabilities(&self) -> impl Iterator<Item = &String>
Get all capabilities in the graph
Sourcepub fn component_count(&self) -> usize
pub fn component_count(&self) -> usize
Get total number of components
Sourcepub fn capability_count(&self) -> usize
pub fn capability_count(&self) -> usize
Get total number of capabilities
Sourcepub fn integration_count(&self) -> usize
pub fn integration_count(&self) -> usize
Get total number of integration patterns
Trait Implementations§
Source§impl Clone for KnowledgeGraph
impl Clone for KnowledgeGraph
Source§fn clone(&self) -> KnowledgeGraph
fn clone(&self) -> KnowledgeGraph
Returns a duplicate of the value. Read more
1.0.0 · 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 KnowledgeGraph
impl Debug for KnowledgeGraph
Source§impl Default for KnowledgeGraph
impl Default for KnowledgeGraph
Source§fn default() -> KnowledgeGraph
fn default() -> KnowledgeGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KnowledgeGraph
impl RefUnwindSafe for KnowledgeGraph
impl Send for KnowledgeGraph
impl Sync for KnowledgeGraph
impl Unpin for KnowledgeGraph
impl UnsafeUnpin for KnowledgeGraph
impl UnwindSafe for KnowledgeGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more