remove command

This commit is contained in:
Aiden McClelland
2024-05-03 13:38:33 -06:00
parent 2b97135a2b
commit 5279528a97

View File

@@ -2,28 +2,6 @@ pub use cli::*;
// pub use command::*; // pub use command::*;
pub use context::*; pub use context::*;
pub use handler::*; pub use handler::*;
/// `#[command(...)]`
/// - `#[command(cli_only)]` -> executed by CLI instead of RPC server (leaf commands only)
/// - `#[command(rpc_only)]` -> no CLI bindings (leaf commands only)
/// - `#[command(local)]` -> executed wherever it was invoked. (By RPC when hit from RPC server, by cli when invoked from CLI)
/// - `#[command(blocking)]` -> run with [spawn_blocking](tokio::task::spawn_blocking) if in an async context
/// - `#[command(about = "About text")]` -> Set about text for the command
/// - `#[command(rename = "new_name")]` -> Set the name of the command to `new_name` in the RPC and CLI
/// - `#[command(subcommands(...))]` -> Set this as the parent command for the listed subcommands
/// - note: the return type of the decorated function must be the [Context] required by its subcommands, and all args must implement [Clone](std::clone::Clone).
/// - `#[command(subcommands(self(self_command_impl)))]` -> If no subcommand is provided, call this function
/// - `self_command_impl :: Context ctx, Display res, Into<RpcError> err => ctx -> Result<res, err>`
/// - note: [Display](std::fmt::Display) is not required for `res` if it has a custom display function that will take it as input
/// - if `self_command_impl` is async, write `self(self_command_impl(async))`
/// - if `self_command_impl` is blocking, write `self(self_command_impl(blocking))`
/// - default: require a subcommand if subcommands are specified
/// - `#[command(display(custom_display_fn))]` -> Use the function `custom_display_fn` to display the command's result (leaf commands only)
/// - `custom_display_fn :: res -> ()`
/// - note: `res` is the type of the decorated command's output
/// - default: `default_display`
///
/// See also: [arg](rpc_toolkit_macro::arg), [context](rpc_toolkit_macro::context)
pub use rpc_toolkit_macro::command;
pub use server::*; pub use server::*;
pub use {clap, futures, reqwest, serde, serde_json, tokio, url, yajrc}; pub use {clap, futures, reqwest, serde, serde_json, tokio, url, yajrc};