pub trait View: 'static {
// Required method
fn build(self, cx: &mut Cx) -> Node;
// Provided method
fn id(self, id: impl Hash) -> AnyView
where Self: Sized { ... }
}Expand description
Something that can be shown. Build-once: View::build creates native
views and effects; it is never called again for the same place.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".