pub struct UIError {
pub inner: Rc<dyn UIErrorTrait>,
}
Expand description
A wrapping struct for any UI’s error type
To use the wrapper implement UIErrorTrait
on the error type to wrap and
use .into()
to convert it into this UIError wrapper.
Fields§
§inner: Rc<dyn UIErrorTrait>
Implementations§
Source§impl UIError
impl UIError
Sourcepub fn downcast_ref<T: UIErrorTrait>(&self) -> Option<&T>
pub fn downcast_ref<T: UIErrorTrait>(&self) -> Option<&T>
Helper for downcasting into the internal error type
Due to how finnicky this is to get right, with coercing the Rc
Trait Implementations§
Source§impl<E: UIErrorTrait> From<E> for UIError
impl<E: UIErrorTrait> From<E> for UIError
Auto Trait Implementations§
impl Freeze for UIError
impl !RefUnwindSafe for UIError
impl !Send for UIError
impl !Sync for UIError
impl Unpin for UIError
impl !UnwindSafe for UIError
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