Skip to main content

detail

Function detail 

Source
pub fn detail(value: impl Into<String>) -> String
Expand description

Captures runtime diagnostic detail in debug builds and strips it in release builds.

The argument is always evaluated, then either converted to a String (debug) or dropped (release). Prefer detail! when constructing the value is nontrivial or has side effects, because the macro avoids evaluation entirely in release builds.

In debug builds the result is the input string; in release builds it is empty.

let _ = redacted_error::detail("addr=127.0.0.1:8080");