metadata

Macro metadata 

Source
macro_rules! metadata {
    ($key:expr, $value:expr) => { ... };
}
Expand description

Creates a key-value metadata pair for structured error context.

This macro creates an ErrorContext::metadata entry that can be used for structured logging, filtering, or monitoring.

§Arguments

  • $key - The metadata key
  • $value - The metadata value

§Examples

use error_rail::{metadata, ComposableError};

let err = ComposableError::<&str, u32>::new("rate limit exceeded")
    .with_context(metadata!("retry_after", "60"));