summaryrefslogtreecommitdiff
path: root/templates/command.rs.template
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-23 04:49:34 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-23 04:49:34 +0800
commit626536ce51975b051fea087620bc1eb7f6bc69d3 (patch)
treeb24916b22012d9b8b3b09366bca9911781e6d596 /templates/command.rs.template
parentf607f6ac3b98d00370f613e674da7beb4c61ce58 (diff)
Reorganize project structure into systems and assets
Diffstat (limited to 'templates/command.rs.template')
-rw-r--r--templates/command.rs.template45
1 files changed, 45 insertions, 0 deletions
diff --git a/templates/command.rs.template b/templates/command.rs.template
new file mode 100644
index 0000000..1c56c29
--- /dev/null
+++ b/templates/command.rs.template
@@ -0,0 +1,45 @@
+use clap::Parser;
+use serde::Serialize;
+
+use crate::subcmd::{
+ cmd::JVCommand,
+ errors::{CmdExecuteError, CmdPrepareError, CmdRenderError},
+ renderer::{JVRenderResult, JVResultRenderer},
+};
+
+pub struct JVUnknownCommand;
+
+#[derive(Parser, Debug)]
+pub struct JVUnknownArgument;
+
+pub struct JVUnknownInput;
+
+#[derive(Serialize)]
+pub struct JVUnknownOutput;
+
+impl JVCommand<JVUnknownArgument, JVUnknownInput, JVUnknownOutput, JVStatusRenderer>
+ for JVUnknownCommand
+{
+ async fn prepare(
+ _args: JVUnknownArgument,
+ _ctx: JVCommandContext,
+ ) -> Result<JVUnknownInput, CmdPrepareError> {
+ todo!()
+ }
+
+ async fn exec(_input: JVUnknownInput) -> Result<JVUnknownOutput, CmdExecuteError> {
+ todo!()
+ }
+
+ fn get_help_str() -> String {
+ "".to_string()
+ }
+}
+
+pub struct JVStatusRenderer;
+
+impl JVResultRenderer<JVUnknownOutput> for JVStatusRenderer {
+ async fn render(_data: &JVUnknownOutput) -> Result<JVRenderResult, CmdRenderError> {
+ todo!()
+ }
+}