pub unsafe fn write_unsafe(output: &mut Writer, fmt: &[Piece], args: &[Argument])
The write_unsafe
function takes an output stream, a precompiled format
string, and a list of arguments. The arguments will be formatted according
to the specified format string into the output stream provided.
See the documentation for format
for why this function is unsafe and care
should be taken if calling it manually.
Thankfully the rust compiler provides the macro fmtf!
which will perform
all of this validation at compile-time and provides a safe interface for
invoking this function.
Note that this function assumes that there are enough arguments for the format string.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).