#[non_exhaustive]pub enum AnyComponentError {
Component {
name: String,
message: String,
},
NotInitialized(String),
}Expand description
Type-erased error from a boxed AnyComponent. The original typed
error is preserved as a string for log purposes; if callers need the
typed error they should downcast via AnyComponent::as_any_arc.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Component
The underlying component’s typed error, formatted as a string.
Fields
NotInitialized(String)
The component is registered but has not been initialized.
Trait Implementations§
Source§impl Debug for AnyComponentError
impl Debug for AnyComponentError
Source§impl Display for AnyComponentError
impl Display for AnyComponentError
Source§impl Error for AnyComponentError
impl Error for AnyComponentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AnyComponentError
impl RefUnwindSafe for AnyComponentError
impl Send for AnyComponentError
impl Sync for AnyComponentError
impl Unpin for AnyComponentError
impl UnsafeUnpin for AnyComponentError
impl UnwindSafe for AnyComponentError
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