Syntax is @[color/attr]...@@. Also, from_format_string now takes a vec of colors and a vec of attributes--these are applied to places in the format string marked by @[C] for colors and @[A] for attributes, like the way format!/println!/printf interpret their arguments. These colors/attributes can be constants, or functions of request and response.
For example, the default format is now given by the format string
Syntax is
@[color/attr]...@@
. Also, from_format_string now takes a vec of colors and a vec of attributes--these are applied to places in the format string marked by@[C]
for colors and@[A]
for attributes, like the way format!/println!/printf interpret their arguments. These colors/attributes can be constants, or functions of request and response.For example, the default format is now given by the format string
with the vecs
where status_color is a function that returns the appropriate option color from req and res.