Macro with_format_context

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

A macro to access the global format context for read-only operations.

This macro provides a convenient way to use the global format context without dealing with mutex locking and unlocking directly.

ยงExample

let formatted = with_format_context!(|ctx| e.format_opt(Some(ctx)));