FailurePanel builder
A panel that states what went wrong instead of what it was going to show.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::display::FailurePanel;
Construct
new(ident: impl Into<Ident>, reason: impl Into<SharedString>) -> Self
from_result<T, E: std::fmt::Display>(ident: impl Into<Ident>, result: &Result<T, E>) -> Option<Self>Options
Chain onto the value.
title(title: impl Into<SharedString>) -> Self
detail(detail: impl Into<SharedString>) -> Self
attempts(attempts: usize) -> Self
retrying(retrying: bool) -> Self
on_retry(handler: impl Fn(&mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.