pub fn from_fn<F>(f: F) -> RenderFnExpand description
Creates a render function from a closure.
This is the primary way to provide custom rendering logic. The closure should capture any context it needs (format, theme, templates, etc.).
Accepts FnMut closures, allowing mutable state in the render handler.
ยงExample
use standout_dispatch::{from_fn, RenderError};
let render = from_fn(|data| {
Ok(serde_json::to_string_pretty(data)?)
});