pub struct NodeConfigManager { /* private fields */ }Expand description
Manager for caching and retrieving node configurations.
Builds configs from graph node data and caches them by node ID.
Implementations§
Source§impl NodeConfigManager
impl NodeConfigManager
Sourcepub fn build_from_graph(&mut self, graph: &StaticGraph)
pub fn build_from_graph(&mut self, graph: &StaticGraph)
Build configs from a graph
Sourcepub fn from_graph_json(&mut self, graph_json: &str) -> Result<(), String>
pub fn from_graph_json(&mut self, graph_json: &str) -> Result<(), String>
Build configs from a JSON string
Sourcepub fn get_boolean(&self, nodeid: &str) -> Option<&NodeConfigBoolean>
pub fn get_boolean(&self, nodeid: &str) -> Option<&NodeConfigBoolean>
Get boolean config for a node
Sourcepub fn get_concept(&self, nodeid: &str) -> Option<&NodeConfigConcept>
pub fn get_concept(&self, nodeid: &str) -> Option<&NodeConfigConcept>
Get concept config for a node
Sourcepub fn get_reference(&self, nodeid: &str) -> Option<&NodeConfigReference>
pub fn get_reference(&self, nodeid: &str) -> Option<&NodeConfigReference>
Get reference config for a node
Sourcepub fn get_domain(&self, nodeid: &str) -> Option<&NodeConfigDomain>
pub fn get_domain(&self, nodeid: &str) -> Option<&NodeConfigDomain>
Get domain config for a node
Sourcepub fn lookup_domain_value(
&self,
nodeid: &str,
value_id: &str,
) -> Option<&StaticDomainValue>
pub fn lookup_domain_value( &self, nodeid: &str, value_id: &str, ) -> Option<&StaticDomainValue>
Look up domain value by ID
Sourcepub fn has_config(&self, nodeid: &str) -> bool
pub fn has_config(&self, nodeid: &str) -> bool
Check if a node has config
Sourcepub fn get_config_type(&self, nodeid: &str) -> Option<&'static str>
pub fn get_config_type(&self, nodeid: &str) -> Option<&'static str>
Get the config type for a node
Sourcepub fn get(&self, nodeid: &str) -> Option<&NodeConfig>
pub fn get(&self, nodeid: &str) -> Option<&NodeConfig>
Get config for a node
Trait Implementations§
Source§impl Debug for NodeConfigManager
impl Debug for NodeConfigManager
Source§impl Default for NodeConfigManager
impl Default for NodeConfigManager
Source§fn default() -> NodeConfigManager
fn default() -> NodeConfigManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NodeConfigManager
impl RefUnwindSafe for NodeConfigManager
impl Send for NodeConfigManager
impl Sync for NodeConfigManager
impl Unpin for NodeConfigManager
impl UnsafeUnpin for NodeConfigManager
impl UnwindSafe for NodeConfigManager
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