#[non_exhaustive]pub enum TokioRuntimeError {
NotEntered {
source: TryCurrentError,
},
}Available on crate feature
tokio only.Expand description
Describes why a Tokio-backed type cannot capture the current runtime.
This error occurs only in try_current constructors. Once constructed, a
Tokio clock or timer uses its retained runtime handle and does not depend on
the caller’s ambient runtime context. The enum is non-exhaustive; callers
must retain a fallback arm when matching it.
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.
NotEntered
No Tokio runtime is entered on the current thread.
Fields
§
source: TryCurrentErrorRuntime lookup error reported by Tokio.
Trait Implementations§
Source§impl Debug for TokioRuntimeError
impl Debug for TokioRuntimeError
Source§impl Display for TokioRuntimeError
impl Display for TokioRuntimeError
Source§impl Error for TokioRuntimeError
impl Error for TokioRuntimeError
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 TokioRuntimeError
impl RefUnwindSafe for TokioRuntimeError
impl Send for TokioRuntimeError
impl Sync for TokioRuntimeError
impl Unpin for TokioRuntimeError
impl UnsafeUnpin for TokioRuntimeError
impl UnwindSafe for TokioRuntimeError
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