pub struct CustomErrorBoundary<W> { /* private fields */ }Expand description
A widget wrapper with custom fallback support.
Like ErrorBoundary, but accepts a custom factory for producing
fallback widgets when the inner widget panics.
Implementations§
Source§impl<W: Widget> CustomErrorBoundary<W>
impl<W: Widget> CustomErrorBoundary<W>
Sourcepub fn fallback_factory(
self,
factory: impl Fn(&CapturedError) -> FallbackWidget + Send + Sync + 'static,
) -> Self
pub fn fallback_factory( self, factory: impl Fn(&CapturedError) -> FallbackWidget + Send + Sync + 'static, ) -> Self
Set the fallback factory.
Sourcepub fn max_recovery_attempts(self, max: u32) -> Self
pub fn max_recovery_attempts(self, max: u32) -> Self
Set maximum recovery attempts.
Trait Implementations§
Source§impl<W: Widget> StatefulWidget for CustomErrorBoundary<W>
impl<W: Widget> StatefulWidget for CustomErrorBoundary<W>
Auto Trait Implementations§
impl<W> Freeze for CustomErrorBoundary<W>where
W: Freeze,
impl<W> !RefUnwindSafe for CustomErrorBoundary<W>
impl<W> Send for CustomErrorBoundary<W>where
W: Send,
impl<W> Sync for CustomErrorBoundary<W>where
W: Sync,
impl<W> Unpin for CustomErrorBoundary<W>where
W: Unpin,
impl<W> !UnwindSafe for CustomErrorBoundary<W>
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