(&self, node: Node)
| 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 { |
no test coverage detected