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
use *;
/// Props for the `euv_debug` component.
///
/// Defines the strongly-typed interface for the dev-only Debug
/// readout. The component renders a labeled `<pre data-euv-debug>`
/// block whose body is the result of invoking `value` on every
/// render, so users can inspect reactive state without breaking
/// out of the component tree.
///
/// `value` is wrapped in `Option<DebugValueFormatter>` (rather
/// than `DebugValueFormatter` directly) so the struct can
/// derive `Default` — the upstream `#[derive(New)]` macro
/// expects every props struct to also be `Default` (it generates
/// `X::new(...)` AND `X::default()` from the same field list).
/// A bare `Rc<dyn Fn() -> String>` has no `Default` impl (you
/// cannot synthesise an arbitrary formatter), so wrapping in
/// `Option` keeps the derive happy and gives us a sensible
/// "no formatter configured" fallback.