1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#![deny(missing_docs, missing_debug_implementations)]
mod console_dbg;
mod counter;
#[doc(hidden)]
pub mod externs;
mod macros;
mod timer;
pub use counter::Counter;
pub use macros::*;
pub use timer::Timer;
#[doc(hidden)]
pub mod __macro {
use gloo_utils::format::JsValueSerdeExt;
pub use js_sys::Array;
pub use wasm_bindgen::JsValue;
use wasm_bindgen::UnwrapThrowExt;
pub fn table_with_data_and_columns<'a>(
data: impl serde::Serialize,
columns: impl IntoIterator<Item = &'a str>,
) {
let data = <JsValue as JsValueSerdeExt>::from_serde(&data).unwrap_throw();
let columns = columns.into_iter().map(JsValue::from_str).collect();
crate::externs::table_with_data_and_columns(data, columns);
}
}