fun-htmx 1.1.0

HTMX attributes for `fun-html`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg(feature = "serde_json")]

use fun_htmx::{hx_vals, hx_vals_serde};
use serde::Serialize;

#[test]
fn test_hx_vals_serde() {
    assert_eq!(
        hx_vals_serde(&Example { foo: "bar" }).to_string(),
        hx_vals("{\"foo\":\"bar\"}").to_string(),
    )
}

#[derive(Debug, Serialize)]
struct Example {
    foo: &'static str,
}