API ReferenceLayout Widgets
ErrorWidget
On-screen display for framework build and layout errors.
ErrorWidget renders a framework error message in place of the failed
subtree, so layout failures are visible instead of silent.
use incular::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let app = Application::new(|_cx| {
Container::builder()
.padding(EdgeInsets::all(24.0))
.alignment(Alignment::CENTER)
.child(ErrorWidget::with_message("custom failure"))
.build()
.into()
})?;
incular::run(app)?;
Ok(())
}Related: Application.