zyn 0.5.4

A proc macro framework with templates, composable elements, and built-in diagnostics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[test]
fn string_format() {
    let name = zyn::format_ident!("hello");
    let result = zyn::zyn!({{ name | fmt:"get_{}" }});
    assert_eq!(result.to_string(), "\"get_hello\"");
}

#[test]
fn chained_with_case() {
    let name = zyn::format_ident!("HelloWorld");
    let result = zyn::zyn!({{ name | snake | fmt:"{}-component" }});
    assert_eq!(result.to_string(), "\"hello_world-component\"");
}