pub enum TokioTpErr {
Builder(ErrorKind),
Cloned(TokioTp),
Handle(TokioTp),
NoRuntime,
WrongFlavour,
}
Expand description
A few errors that can happen while using tokio executors.
Variants§
Builder(ErrorKind)
The tokio::runtime::Builder
returned an error when construting the Runtime
.
Cloned(TokioTp)
There are other clones of the Runtime
, so we cannot shut it down.
Handle(TokioTp)
This executor was constructed from the a Handle
, so cannot be shut down.
NoRuntime
Can’t create from current runtime because no runtime currently entered.
WrongFlavour
Can’t construct from a current thread runtime.
Trait Implementations§
Source§impl Clone for TokioTpErr
impl Clone for TokioTpErr
Source§fn clone(&self) -> TokioTpErr
fn clone(&self) -> TokioTpErr
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TokioTpErr
impl Debug for TokioTpErr
Source§impl Display for TokioTpErr
impl Display for TokioTpErr
Source§impl Error for TokioTpErr
impl Error for TokioTpErr
1.30.0 · 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 TokioTpErr
impl RefUnwindSafe for TokioTpErr
impl Send for TokioTpErr
impl Sync for TokioTpErr
impl Unpin for TokioTpErr
impl UnwindSafe for TokioTpErr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Builder
: 1 byteCloned
: 23 bytesHandle
: 23 bytesNoRuntime
: 0 bytesWrongFlavour
: 0 bytes