Skip to main content

ResponseRewriter

Trait ResponseRewriter 

Source
pub trait ResponseRewriter: Send + Sync {
    // Required method
    fn expand_tokens(&self, body: &mut Value);
}
Expand description

Hook for template token expansion, called only when expansion is enabled for the current context.

Required Methods§

Source

fn expand_tokens(&self, body: &mut Value)

Expand template tokens (e.g. {{uuid}}, {{now}}) in-place inside the response body.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§