summaryrefslogtreecommitdiff
path: root/templates/_commands.rs.template
blob: c11e312c563de8009ce1da64dfdb1ad1fa2296d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Auto generated by build.rs
use crate::systems::cmd::cmd_system::{JVCommand, JVCommandContext};
use crate::systems::cmd::errors::CmdProcessError;

/// Input parameters, execute a command node
pub async fn jv_cmd_process_node(
    node: &str,
    args: Vec<String>,
    ctx: JVCommandContext,
    renderer_override: String
) -> Result<crate::systems::render::renderer::JVRenderResult, crate::systems::cmd::errors::CmdProcessError> {
    match node {
>>>>>>>>>> command_match_arms
        _ => {}
    }
    return Err(CmdProcessError::NoNodeFound(node.to_string()));
}

/// Get all command nodes
pub fn jv_cmd_nodes() -> Vec<String> {
    vec!<<<nodes>>>
}

@@@ >>> command_match_arms
        // Command `<<<key>>>`
        "<<<node_name>>>" => {
            if renderer_override == "default" {
                return crate::<<<cmd_type>>>::process_to_render_system(
                    args, ctx,
                )
                .await;
            } else {
                return crate::<<<cmd_type>>>::process_to_renderer_override(
                    args,
                    ctx,
                    renderer_override,
                )
                .await;
            }
        }
@@@ <<<