pub unsafe fn format_unsafe(fmt: &[Piece], args: &[Argument]) -> ~str
The unsafe version of the formatting function.
This is currently an unsafe function because the types of all arguments
aren't verified by immediate callers of this function. This currently does
not validate that the correct types of arguments are specified for each
format specifier, nor that each argument itself contains the right function
for formatting the right type value. Because of this, the function is marked
as unsafe
if this is being called manually.
Thankfully the rust compiler provides the macro format!
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
).