pub trait View<T, S, D>: 'static {
// Required method
fn call(&self, ui: &mut Ui, cx: &ViewContext<'_, S>);
}Expand description
A page or error view: Fn(&mut Ui, T1, …, T16) where every T is a FromView extractor,
in any order. T is a tuple of the extractor types and only keeps the implementations apart.
The data extractors are checked against what the load returns:
ⓘ
async fn load() -> Result<u32, Rejection> {
Ok(1)
}
fn view(ui: &mut egui::Ui, data: &String) {}
let page = Page::<()>::with_load(load, view); // `load` returns a `u32`, not a `String`Required Methods§
fn call(&self, ui: &mut Ui, cx: &ViewContext<'_, S>)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".