tag

Macro tag 

Source
macro_rules! tag {
    ($tag:expr) => { ... };
}
Expand description

Creates a categorical tag for error classification.

This macro creates an ErrorContext::tag that can be used to categorize and filter errors by domain (e.g., “db”, “auth”, “network”).

§Arguments

  • $tag - A string or expression that can be converted into a tag

§Examples

use error_rail::{tag, ComposableError};

let err = ComposableError::<&str, u32>::new("connection failed")
    .with_context(tag!("network"));