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

#332 in Template engine

Download history 3490/week @ 2024-07-22 3477/week @ 2024-07-29 3511/week @ 2024-08-05 3614/week @ 2024-08-12 3710/week @ 2024-08-19 3491/week @ 2024-08-26 3253/week @ 2024-09-02 3336/week @ 2024-09-09 3254/week @ 2024-09-16 3755/week @ 2024-09-23 3467/week @ 2024-09-30 3291/week @ 2024-10-07 2914/week @ 2024-10-14 4197/week @ 2024-10-21 2483/week @ 2024-10-28 3103/week @ 2024-11-04

12,711 downloads per month
Used in 10 crates (8 directly)

MIT license

23KB
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

~0.3–0.8MB
~19K SLoC