formatx 0.3.0

A macro for formatting non literal strings at runtime in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! The [`FormatValue`] marker trait.

use std::fmt::{Debug, Display};

/// Marker trait for values that can be formatted at runtime.
///
/// Blanket-implemented for all `T: Display + Debug`, which covers the vast
/// majority of Rust types (`i32`, `f64`, `String`, `&str`, `bool`, `char`,
/// custom types with `#[derive(Debug)]` and a `Display` impl, etc.).
pub trait FormatValue: Display + Debug {}

impl<T: Display + Debug> FormatValue for T {}