microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
flowey/flowey_cli/src/cli/debug/list_nodes.rs
21lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | /// (debug) list all registered flowey nodes |
| 5 | #[derive(clap::Args)] |
| 6 | pub struct ListNodes; |
| 7 | |
| 8 | impl ListNodes { |
| 9 | pub fn run(self) -> anyhow::Result<()> { |
| 10 | // FUTURE: it might be worth improving this output to leverage the DAG? |
| 11 | let mut v = flowey_core::node::list_all_registered_nodes() |
| 12 | .map(|h| h.modpath()) |
| 13 | .collect::<Vec<_>>(); |
| 14 | v.sort(); |
| 15 | for node in v { |
| 16 | println!("{node}") |
| 17 | } |
| 18 | |
| 19 | Ok(()) |
| 20 | } |
| 21 | } |
| 22 | |