diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-14 18:32:47 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-14 18:32:47 +0800 |
| commit | 707a1f7c747a08e2ce77df88edc1e72eae9cbebc (patch) | |
| tree | 53a64b10b788b57219ff2387322e50698d32198a /src/cmds/cmd/workspace.rs | |
| parent | 521b7a7b08eebd30db215d84b55626fe8bf7533a (diff) | |
Add workspace commands and supporting types
Diffstat (limited to 'src/cmds/cmd/workspace.rs')
| -rw-r--r-- | src/cmds/cmd/workspace.rs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/cmds/cmd/workspace.rs b/src/cmds/cmd/workspace.rs new file mode 100644 index 0000000..f72bcd5 --- /dev/null +++ b/src/cmds/cmd/workspace.rs @@ -0,0 +1,45 @@ +use crate::{ + cmd_output, + cmds::{ + arg::empty::JVEmptyArgument, collect::empty::JVEmptyCollect, r#in::empty::JVEmptyInput, + out::none::JVNoneOutput, + }, + systems::{ + cmd::{ + cmd_system::JVCommandContext, + errors::{CmdExecuteError, CmdPrepareError}, + }, + helpdoc::helpdoc_viewer, + }, +}; +use cmd_system_macros::exec; +use std::any::TypeId; + +pub struct JVWorkspaceCommand; +type Cmd = JVWorkspaceCommand; +type Arg = JVEmptyArgument; +type In = JVEmptyInput; +type Collect = JVEmptyCollect; + +async fn help_str() -> String { + helpdoc_viewer::display("commands/workspace").await; + String::new() +} + +async fn prepare(_args: &Arg, _ctx: &JVCommandContext) -> Result<In, CmdPrepareError> { + Ok(JVEmptyInput) +} + +async fn collect(_args: &Arg, _ctx: &JVCommandContext) -> Result<Collect, CmdPrepareError> { + Ok(JVEmptyCollect) +} + +#[exec] +async fn exec( + _input: In, + _collect: Collect, +) -> Result<(Box<dyn std::any::Any + Send + 'static>, TypeId), CmdExecuteError> { + cmd_output!(JVNoneOutput => JVNoneOutput) +} + +crate::command_template!(); |
