web_tools/optimistic/mod.rs
1//! Optimistic operations
2//!
3//! In may cases, Web APIs in Rust return [`Result`] or [`Option`] and enforce strict types. Then
4//! again in JavaScript-land one can simply call `.focus()` on something and it works, breaks, or
5//! does nothing. But the code looks a bit simpler.
6//!
7//! Optimistic traits bring part of this to Rust. Functions on [`yew::prelude::NodeRef`] just work,
8//! or fail silently.
9
10mod element;
11mod html_element;
12mod html_form_element;
13mod html_input_element;
14
15pub use element::*;
16pub use html_element::*;
17pub use html_form_element::*;
18pub use html_input_element::*;