Skip to main content

Preview

Type Alias Preview 

Source
pub type Preview<T> = Arc<dyn Fn(&T) -> Option<String> + Send + Sync>;
Expand description

Renders the text a confirmed-mismatch warning logs for a value when mismatch_logging.value is on, in place of the value’s JSON. None, or a panic, logs the field as unavailable with a render_error outcome. A preview you set replaces the JSON for the whole warning, so the built-in difference computation never reads what it leaves out: difference fields then come only from a MismatchDiffHook. Runs through Runtime::spawn_blocking after mismatch confirmation; callbacks may run on a CPU worker thread.

Aliased Type§

pub struct Preview<T> { /* private fields */ }