diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-10-12 18:16:36 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-10-12 18:16:36 +0800 |
| commit | ffdc23d102faab74838a36a8044c6f11b289d760 (patch) | |
| tree | 20b986c9a79afbeb5b11dece3435e9d0fcebc5da | |
| parent | 19c5780c2ee4920916aa5d766e02faa27fe2af2a (diff) | |
refactor: Update action macros and error types
- Enhance action_gen macro functionality
- Add new error variants for TCP connection
| -rw-r--r-- | crates/system_action/action_macros/src/lib.rs | 8 | ||||
| -rw-r--r-- | crates/utils/tcp_connection/src/error.rs | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/crates/system_action/action_macros/src/lib.rs b/crates/system_action/action_macros/src/lib.rs index a7de9b6..04e974a 100644 --- a/crates/system_action/action_macros/src/lib.rs +++ b/crates/system_action/action_macros/src/lib.rs @@ -79,13 +79,13 @@ fn generate_action_struct(input_fn: ItemFn, _is_local: bool) -> proc_macro2::Tok #[doc = "Use the generated struct instead."] #[doc = ""] #[doc = "Register the action to the pool."] - #[doc = "```rust"] - #[doc = "YourActionPascalName::register_to_pool(&mut pool);"] + #[doc = "```ignore"] + #[doc = "YourAction::register_to_pool(&mut pool);"] #[doc = "```"] #[doc = ""] #[doc = "Process the action at the pool."] - #[doc = "```rust"] - #[doc = "let result = YourActionPascalName::process_at_pool(&pool, ctx, arg).await?;"] + #[doc = "```ignore"] + #[doc = "let result = YourAction::process_at_pool(&pool, ctx, arg).await?;"] #[doc = "```"] #fn_vis #fn_sig #fn_block } diff --git a/crates/utils/tcp_connection/src/error.rs b/crates/utils/tcp_connection/src/error.rs index 691e5ee..28e33d3 100644 --- a/crates/utils/tcp_connection/src/error.rs +++ b/crates/utils/tcp_connection/src/error.rs @@ -41,6 +41,9 @@ pub enum TcpTargetError { #[error("Not remote machine: {0}")] NotRemote(String), + + #[error("Not found: {0}")] + NotFound(String), } impl From<io::Error> for TcpTargetError { |
