pub trait IntoViewKeyExt<A>: IntoView<A> + Sized {
// Provided method
fn key(self, key: impl Into<String>) -> View<A> { ... }
}Expand description
Allows widget.key("id") instead of widget.into_view().key("id").
§Examples
use ailloli_ui_runtime::component::{IntoViewKeyExt, View};
let view: View<()> = IntoViewKeyExt::key(View::empty(), "item");
assert_eq!(view.key_ref(), Some("item"));Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T, A> IntoViewKeyExt<A> for Twhere
T: IntoView<A>,
Implements the IntoViewKeyExt<A> contract for T where T: IntoView<A>.