define_tool_error

Macro define_tool_error 

Source
macro_rules! define_tool_error {
    ($name:ident) => { ... };
}
Expand description

Macro to define a tool error type with standard From implementations.

This creates a newtype wrapper around String that implements:

  • Debug, thiserror::Error
  • From<anyhow::Error>
  • From<std::io::Error>

§Example

define_tool_error!(GitError);
// Creates: pub struct GitError(String);
// With Display showing: "GitError: {message}"