pub trait PrintfFormatter {
const FORMAT_ARG: &'static str;
}
Expand description
Trait used to produce printf style format strings for untyped format specifiers.
The const PrintfFormatter::FORMAT_ARG
is used to provide the printf
format specifier (i.e. the d
in %02d
) for a given type in Rust. This
must be const so that it can be used to build static const format strings at
compile time.
Required Associated Constants§
Sourceconst FORMAT_ARG: &'static str
const FORMAT_ARG: &'static str
The format specifier for this type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.