Skip to main content

Crate resext_macro

Crate resext_macro 

Source
Expand description

Procedural macro for resext.

This crate provides the #[resext] proc-macro attribute for ergonomic error handling. It is not meant to be used directly - use the resext crate instead.

§Overview

The proc macro generates all necessary error handling code from a simple attribute:

#[resext]
enum MyError {
    Io(std::io::Error),
    Utf8(core::str::Utf8Error),
}

This expands to approximately 300 lines of boilerplate including:

  • Display, Debug and Error trait implementations
  • Wrapper struct with inline, zero-alloc context storage
  • Trait with context method
  • From<E> implementations for automatic conversion
  • Type alias for Result<T, ResErr>

§Attribute Options

See the resext crate documentation for detailed information on all available options.

Attribute Macros§

resext
Generate error handling boilerplate for an enum.