pub struct ErrorStatePropsBuilder<'__a, __title = title> { /* private fields */ }Expand description
Typestate builder for ErrorStateProps, created by ErrorStateProps::builder(). build() becomes available once every required property has been set.
Implementations§
Source§impl<'__a, __title> ErrorStatePropsBuilder<'__a, __title>
impl<'__a, __title> ErrorStatePropsBuilder<'__a, __title>
Sourcepub fn title(
self,
title: impl Into<String>,
) -> ErrorStatePropsBuilder<'__a, Set>
pub fn title( self, title: impl Into<String>, ) -> ErrorStatePropsBuilder<'__a, Set>
Short heading naming what failed, e.g. "Couldn't load Users".
Sourcepub fn detail(self, detail: impl Into<String>) -> Self
pub fn detail(self, detail: impl Into<String>) -> Self
Optional muted detail line. Keep it generic — no error internals.
Sourcepub fn action(self, action: Option<Child<'__a>>) -> Self
pub fn action(self, action: Option<Child<'__a>>) -> Self
Optional action under the text (e.g. a retry link). It inherits the
component’s action styling; pass a plain <a> (or button) without
your own color classes.
Sourcepub fn attrs(self, attrs: Attributes) -> Self
pub fn attrs(self, attrs: Attributes) -> Self
Extra attributes for the container. Add role="alert" here when the
region swaps in during a visit and the failure should be announced.
Sourcepub fn build(self) -> ErrorStateProps<'__a>where
__title: IsSet,
pub fn build(self) -> ErrorStateProps<'__a>where
__title: IsSet,
Builds the props struct from the set properties.
Only available once every required property has been set.
#[default] properties that were not set are filled with
Default::default(), or the #[default(expr)] expression.