pub struct error_state;Expand description
Renders a failed load inside the content region that failed.
Keeps detail generic: never renders error internals (driver messages, SQL, paths) into the
page.
let action = view! { cx => <a href=(list_url)>"Retry"</a> }.boxed();
Ok(view! { cx =>
error_state(
title: "Couldn't load Users",
detail: "Something went wrong while loading the records.",
action: Some(action.into()),
)
}
.boxed())Trait Implementations§
Source§impl Component for error_state
impl Component for error_state
Source§type Props<'__props> = ErrorStateProps<'__props>
type Props<'__props> = ErrorStateProps<'__props>
The component’s properties. The lifetime covers data borrowed from
the caller.
Source§fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn props_builder<'a>() -> <Self::Props<'a> as Props>::Builder
Auto Trait Implementations§
impl Freeze for error_state
impl RefUnwindSafe for error_state
impl Send for error_state
impl Sync for error_state
impl Unpin for error_state
impl UnsafeUnpin for error_state
impl UnwindSafe for error_state
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more