pub struct TryCurrentError { /* 私有字段 */ }展开描述
当没有 Runtime 启动时,由 try_current 返回的错误
实现§
源代码§impl TryCurrentError
impl TryCurrentError
源代码pub fn is_missing_context(&self) -> bool
pub fn is_missing_context(&self) -> bool
如果调用失败是因为 Tokio 上下文中当前没有运行时,则返回 true。
源代码pub fn is_thread_local_destroyed(&self) -> bool
pub fn is_thread_local_destroyed(&self) -> bool
如果调用失败是因为 Tokio 上下文线程局部已被销毁,则返回 true。这通常仅在其他线程局部的析构函数中才会发生。
trait 实现§
源代码§impl Debug for TryCurrentError
impl Debug for TryCurrentError
源代码§impl Display for TryCurrentError
impl Display for TryCurrentError
自动 trait 实现§
impl Freeze for TryCurrentError
impl RefUnwindSafe for TryCurrentError
impl Send for TryCurrentError
impl Sync for TryCurrentError
impl Unpin for TryCurrentError
impl UnsafeUnpin for TryCurrentError
impl UnwindSafe for TryCurrentError
blanket 实现§
源代码§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
源代码§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. 更多信息