pub trait OptionAttribute {
// Required method
fn value(&self) -> String;
}Expand description
A trait for handling optional attribute values.
This trait is automatically implemented for Option<T> where T implements ToString.
It allows for graceful handling of optional attributes, rendering them as empty strings when None.
§Example
use simple_rsx::*;
let maybe_title = Some("Hello".to_string());
let element = rsx!(<div title={maybe_title} />);