TextRoute

Trait TextRoute 

Source
pub trait TextRoute: FnMut() -> String + 'static { }
Expand description

In some cases it’s possible to install a route that only returns text. this is used for certain side behavior such as returning prometheus scrape renders. These are meant to be static and have no parameter and respond only on absolute paths: no request object is available and the response is always a string.

Implementors§

Source§

impl<T> TextRoute for T
where T: FnMut() -> String + 'static,