It’s technically possible, but horribly unsafe. The only thing that makes it 
safe to do normally is the syntax extension that implements `format!()` ensures 
all the types match. If you really think you need this, you can look at the 
implementation of core::fmt. But it’s certainly not appropriate for 
localization, or template engines.

-Kevin Ballard

> On Aug 24, 2014, at 2:48 PM, Vadim Chugunov <vadi...@gmail.com> wrote:
> 
> Hi,
> Is there any way to make Rust's fmt module to consume format template 
> specified at runtime? 
> This might be useful for localization of format!'ed strings, or, if one wants 
> to use format! as a rudimentary template engine.
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to