pub trait View:
Sized
+ Send
+ 'static {
type Vm: ViewModel;
const META: ScreenMeta;
// Required methods
fn build() -> (Self, Widget, Parts);
fn update(&mut self, root: &mut Widget, vm: &Self::Vm, u: &mut Update);
fn dispatch(
&mut self,
vm: &mut Self::Vm,
cx: &mut Cx<'_, Self::Vm>,
ev: ViewEvent,
);
}Expand description
A compiled screen — implemented by .yui codegen only.
The host owns the content tree; paths are child-index paths from its
root (Widget::at_path).
Required Associated Constants§
const META: ScreenMeta
Required Associated Types§
Required Methods§
Sourcefn build() -> (Self, Widget, Parts)
fn build() -> (Self, Widget, Parts)
The view’s binding state, its content tree and its interactive parts.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".