roadster 0.8.1

A "Batteries Included" web framework for rust designed to get you moving fast.
Documentation
1
2
3
4
5
6
7
8
9
10
use tracing::{Value, field};

pub fn optional_trace_field<T>(value: Option<T>) -> Box<dyn Value>
where
    T: ToString,
{
    value
        .map(|x| Box::new(field::display(x.to_string())) as Box<dyn Value>)
        .unwrap_or(Box::new(field::Empty))
}