pub struct CapturedError { /* private fields */ }
Expand description
An instance of an error captured by a descendant component.
Implementations§
Source§impl CapturedError
impl CapturedError
Sourcepub fn from_display(error: impl Display + 'static) -> Self
pub fn from_display(error: impl Display + 'static) -> Self
Create a new error from a type that only implements Display
. If your type implements Error
, you can use CapturedError::from
instead.
Sourcepub fn with_origin(self, scope: ScopeId) -> Self
pub fn with_origin(self, scope: ScopeId) -> Self
Mark the error as being thrown from a specific scope
Trait Implementations§
Source§impl Clone for CapturedError
impl Clone for CapturedError
Source§fn clone(&self) -> CapturedError
fn clone(&self) -> CapturedError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Context<T, CapturedError> for Option<T>
impl<T> Context<T, CapturedError> for Option<T>
Source§fn show(
self,
display_error: impl FnOnce(&CapturedError) -> Element,
) -> Result<T>
fn show( self, display_error: impl FnOnce(&CapturedError) -> Element, ) -> Result<T>
Add a visual representation of the error that the
ErrorBoundary
may render Read moreSource§impl Debug for CapturedError
impl Debug for CapturedError
Source§impl Display for CapturedError
impl Display for CapturedError
Source§impl From<CapturedError> for RenderError
impl From<CapturedError> for RenderError
Source§fn from(e: CapturedError) -> Self
fn from(e: CapturedError) -> Self
Converts to this type from the input type.
Source§impl<E: AnyError + 'static> From<E> for CapturedError
impl<E: AnyError + 'static> From<E> for CapturedError
Source§impl FromStr for CapturedError
impl FromStr for CapturedError
Source§impl PartialEq for CapturedError
impl PartialEq for CapturedError
Auto Trait Implementations§
impl !Freeze for CapturedError
impl !RefUnwindSafe for CapturedError
impl !Send for CapturedError
impl !Sync for CapturedError
impl Unpin for CapturedError
impl !UnwindSafe for CapturedError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.