(local_key: u64, ty: &str)
| 85 | } |
| 86 | |
| 87 | pub(crate) fn inputs(local_key: u64, ty: &str) -> Result<BTreeSet<String>> { |
| 88 | if let Some(node) = NodeSlice::registry_local().get(local_key).get(ty) { |
| 89 | Ok(node.info.inputs.iter().cloned().collect()) |
| 90 | } else if let Some(graph) = GraphSlice::registry_local().get(local_key).get(ty) { |
| 91 | Ok(graph.info.inputs.iter().cloned().collect()) |
| 92 | } else { |
| 93 | Err(anyhow!("unexpected node {}", ty)) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | pub(crate) fn outputs(local_key: u64, ty: &str) -> Result<BTreeSet<String>> { |
| 98 | if let Some(node) = NodeSlice::registry_local().get(local_key).get(ty) { |
no test coverage detected