interpolator
Runtime implementation of format!
.
format
Runtime version of format!
.
Takes a string and a context, containing Formattable
values, returns a
string.
use ;
let formatted = format
.unwrap;
assert_eq!;
write
Runtime version of write!
.
Takes a mutable Write
e.g. &mut String
, a format string and a context,
containing Formattable
values.
use ;
let mut buf = String new;
write
.unwrap;
assert_eq!;
Features
By default only Display
is supported, the rest of the
formatting traits
can be enabled through the following features.
debug
enables?
,x?
andX?
trait specifiersnumber
enablesx
,X
,b
,o
,e
andE
trait specifierspointer
enablesp
trait specifiers