Struct TryCurrentError

pub struct TryCurrentError { /* private fields */ }

Error returned by try_current when no Runtime has been started

Implementations

impl TryCurrentError

fn is_missing_context(&self) -> bool

Returns true if the call failed because there is currently no runtime in the Tokio context.

fn is_thread_local_destroyed(&self) -> bool

Returns true if the call failed because the Tokio context thread-local had been destroyed. This can usually only happen if in the destructor of other thread-locals.

Trait Implementations

impl Debug for TryCurrentError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for TryCurrentError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Error for TryCurrentError

Auto Trait Implementations

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 Implementations

impl<T> Any for TryCurrentError where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for TryCurrentError where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for TryCurrentError where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for TryCurrentError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToString for TryCurrentError where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T, U> Into<U> for TryCurrentError where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for TryCurrentError where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for TryCurrentError where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>