diff options
Diffstat (limited to 'templates/_registry.rs.template')
| -rw-r--r-- | templates/_registry.rs.template | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/_registry.rs.template b/templates/_registry.rs.template new file mode 100644 index 0000000..0c6d0d5 --- /dev/null +++ b/templates/_registry.rs.template @@ -0,0 +1,25 @@ +// Auto generated by build.rs +use crate::subcmd::cmd::{JVCommand, JVCommandContext}; +use crate::subcmd::errors::CmdProcessError; +<<LINE>> +/// Input parameters, execute a command node +pub async fn jv_cmd_process_node( + node: &str, + args: Vec<String>, + ctx: JVCommandContext +) -> Result<crate::subcmd::renderer::JVRenderResult, crate::subcmd::errors::CmdProcessError> { + match node { +// PROCESS +// -- TEMPLATE START -- + // Command `<<KEY>>` + "<<NODE_NAME>>" => return crate::<<COMMAND_TYPE>>::process(args, ctx).await, +// -- TEMPLATE END -- + _ => {} + } + return Err(CmdProcessError::NoNodeFound(node.to_string())); +} +<<LINE>> +/// Get all command nodes +pub fn jv_cmd_nodes() -> Vec<String> { + vec!<<NODES>> +} |
