strung 0.1.4

Easy access of struct fields in strings using different/custom pre/postfix: "Hello, {field}"
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(non_snake_case)]
use std::fmt::Display;
use strung::prelude::*;

// named struct
#[derive(Strung)]   // easy derive
struct Test<A: Display> {
    num: A,
    name: &'static str,
}

fn main(){
    // create structs!
    let NAMED  = Test::<u32> {num: 1, name: "st"};

    let text = NAMED.strung("{num}{name}"); 
    println!("strung: {}",&text);
}