#[non_exhaustive]pub struct TokioExecutor {}Available on crate feature
tokio only.Expand description
Future executor that utilises tokio threads.
Spawned futures do not inherit the current tracing span, even when the
tracing feature is enabled. To propagate spans, wrap this executor in
one of the components from rt::tracing, such as
CurrentSpanExecutor (available with
the tracing feature).
See the module-level documentation of rt::tracing
for more information about propagating tracing spans to spawned tasks.
The temporary rt-tracing-exec-force feature restores propagation of the
current span for libraries that do not allow customizing their executor.
It is excluded from full and may be removed in a future breaking release.
Implementations§
Source§impl TokioExecutor
impl TokioExecutor
Sourcepub fn new() -> Self
pub fn new() -> Self
Create new executor that relies on tokio::spawn to execute futures.
Trait Implementations§
Source§impl Clone for TokioExecutor
impl Clone for TokioExecutor
Source§impl Debug for TokioExecutor
impl Debug for TokioExecutor
Source§impl Default for TokioExecutor
impl Default for TokioExecutor
Auto Trait Implementations§
impl Freeze for TokioExecutor
impl RefUnwindSafe for TokioExecutor
impl Send for TokioExecutor
impl Sync for TokioExecutor
impl Unpin for TokioExecutor
impl UnsafeUnpin for TokioExecutor
impl UnwindSafe for TokioExecutor
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