pub struct CallError { /* private fields */ }Expand description
An error returned by a blocking device call.
When a task panics on a device’s runner thread, the panic payload is
captured and carried here instead of being logged and dropped.
A CallError without a payload means the runner channel disconnected
before the task could produce a result.
Implementations§
Source§impl CallError
impl CallError
Sourcepub fn message(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
Returns the panic message if the failure was a panic whose payload is a
string (the common case for panic!, indexing, unwrap, …).
Sourcepub fn into_panic(self) -> Option<Box<dyn Any + Send>>
pub fn into_panic(self) -> Option<Box<dyn Any + Send>>
Consumes the error and returns the captured panic payload, if any.
The payload can be handed to std::panic::resume_unwind to re-raise
the original panic on the caller’s thread.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CallError
impl !Sync for CallError
impl !UnwindSafe for CallError
impl Freeze for CallError
impl Send for CallError
impl Unpin for CallError
impl UnsafeUnpin for CallError
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