pub enum BridgeError {
WorkerDead,
ResponseLost,
}Expand description
Errors returned by RuntimeBridge::block_on when the bridge cannot
complete a request. Both variants signal an unrecoverable problem with
the worker for this one call; the bridge as a whole remains usable for
subsequent calls only when BridgeError::ResponseLost is returned
(the worker is still alive, just this one task died).
Variants§
WorkerDead
The worker thread is gone — sending the task failed because the receiver side of the dispatch channel was dropped. In practice this means the worker thread panicked while building or driving its runtime; every later call will return the same error.
ResponseLost
The task was accepted but no reply ever arrived. The future panicked mid-poll (so its reply sender was dropped without sending) or the worker’s runtime was shut down underneath an in-flight task. Other in-flight requests on the same bridge are unaffected.
Trait Implementations§
Source§impl Debug for BridgeError
impl Debug for BridgeError
Source§impl Display for BridgeError
impl Display for BridgeError
Source§impl Error for BridgeError
impl Error for BridgeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()