Struct simpl_actor::PanicErr
source · pub struct PanicErr(/* private fields */);Expand description
A shared error that occurs when an actor panics or returns an error from a hook in the Actor trait.
Implementations§
source§impl PanicErr
impl PanicErr
sourcepub fn new<E>(err: E) -> Selfwhere
E: Send + 'static,
pub fn new<E>(err: E) -> Selfwhere
E: Send + 'static,
Creates a new PanicErr from a generic error.
sourcepub fn new_boxed(err: Box<dyn Any + Send>) -> Self
pub fn new_boxed(err: Box<dyn Any + Send>) -> Self
Creates a new PanicErr from a generic boxed error.
sourcepub fn with_str<F, R>(
&self,
f: F
) -> Result<Option<R>, PoisonError<MutexGuard<'_, Box<dyn Any + Send>>>>
pub fn with_str<F, R>( &self, f: F ) -> Result<Option<R>, PoisonError<MutexGuard<'_, Box<dyn Any + Send>>>>
Calls the passed closure f with an option containing the boxed any type downcasted into a Cow<'static, str>,
or None if it’s not a string type.
sourcepub fn with_downcast_ref<T, F, R>(
&self,
f: F
) -> Result<Option<R>, PoisonError<MutexGuard<'_, Box<dyn Any + Send>>>>
pub fn with_downcast_ref<T, F, R>( &self, f: F ) -> Result<Option<R>, PoisonError<MutexGuard<'_, Box<dyn Any + Send>>>>
Calls the passed closure f with the inner type downcasted into T, otherwise returns None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PanicErr
impl RefUnwindSafe for PanicErr
impl Send for PanicErr
impl Sync for PanicErr
impl Unpin for PanicErr
impl UnwindSafe for PanicErr
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