MCPcopy Index your code
hub / github.com/ciphermodelabs/ciphercore / get_node_annotations

Method get_node_annotations

ciphercore-base/src/graphs.rs:4517–4529  ·  view source on GitHub ↗
(&self, node: Node)

Source from the content-addressed store, hash-verified

4515 }
4516
4517 pub(super) fn get_node_annotations(&self, node: Node) -> Result<Vec<NodeAnnotation>> {
4518 if node.get_graph().get_context() != *self {
4519 return Err(runtime_error!("The node is in a different context"));
4520 }
4521 let node_id = node.get_id();
4522 let graph_id = node.get_graph().get_id();
4523 let cell = self.body.borrow();
4524 Ok(cell
4525 .nodes_annotations
4526 .get(&(graph_id, node_id))
4527 .cloned()
4528 .unwrap_or_default())
4529 }
4530
4531 fn add_graph_annotation(&self, graph: &Graph, annotation: GraphAnnotation) -> Result<Context> {
4532 if graph.get_context() != *self {

Callers 4

run_instantiation_passFunction · 0.80
get_annotationsMethod · 0.80
check_equivalence_classFunction · 0.80

Calls 4

get_contextMethod · 0.45
get_graphMethod · 0.45
get_idMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected