9 unstable releases (4 breaking)

0.5.1 Jun 7, 2021
0.5.0 Jun 7, 2021
0.4.0 Jan 3, 2021
0.3.3 Sep 30, 2018
0.1.0 Nov 14, 2017

#474 in Rust patterns

Download history 1223/week @ 2022-08-10 1027/week @ 2022-08-17 979/week @ 2022-08-24 1661/week @ 2022-08-31 1282/week @ 2022-09-07 718/week @ 2022-09-14 1092/week @ 2022-09-21 1125/week @ 2022-09-28 1100/week @ 2022-10-05 1510/week @ 2022-10-12 1475/week @ 2022-10-19 1067/week @ 2022-10-26 1223/week @ 2022-11-02 1902/week @ 2022-11-09 1926/week @ 2022-11-16 1230/week @ 2022-11-23

6,485 downloads per month
Used in 9 crates (7 directly)

MIT license

22KB
507 lines

gtmpl_value   Latest Version

The internal value type for gmtpl-rust


[dependencies]
gtmpl_value = "0.5"

Current State

gtmpl_value is a basic implementation for internal values within gtmpl-rust. It is used as to represent values parsed from the template and from the context.

Usage

The From trait is implemented for:

  • String, &str
  • most numeric types u64, u32,, i64, i32,, f64, f32
  • bool
  • Vec<Value>, &[Value]
  • HashMap<String, Value>

gtmpl_derive provides a custom derive for structs.

extern crate gtmpl_value;
use gtmpl_value::Value;

fn main() {
    let v: Value = "something".into();
    println!("{}", v);
}

Dependencies

~325–750KB
~17K SLoC