Struct TokioExecutor

#[non_exhaustive]
pub struct TokioExecutor {}

Future executor that utilises tokio threads.

Implementations

impl TokioExecutor

fn new() -> Self

Create new executor that relies on tokio::spawn to execute futures.

Trait Implementations

impl Clone for TokioExecutor

fn clone(&self) -> TokioExecutor

impl Debug for TokioExecutor

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

impl Default for TokioExecutor

fn default() -> TokioExecutor

impl<Fut> Executor<Fut> for TokioExecutor where Fut: Future + Send + 'static, Fut::Output: Send + 'static,

fn execute(&self, fut: Fut)

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

impl<A, B, T> HttpServerConnExec<A, B> for TokioExecutor where B: Body, T: Http2ServerConnExec<A, B>,

impl<E, B, T> Http2ClientConnExec<B, T> for TokioExecutor where E: Clone + Executor<H2ClientFuture<B, T, E>> + Http2UpgradedExec<<B as Body>::Data>, B: Body + 'static, <B as Body>::Error: Into<Box<dyn Error + Sync + Send>>, H2ClientFuture<B, T, E>: Future<Output = ()>, T: Read + Write + Unpin,

fn execute_h2_future(&mut self, future: H2ClientFuture<B, T, E>)

impl<E, F, B> Http2ServerConnExec<F, B> for TokioExecutor where E: Clone + Executor<H2Stream<F, B, E>> + Http2UpgradedExec<<B as Body>::Data>, H2Stream<F, B, E>: Future<Output = ()>, B: Body,

fn execute_h2stream(&mut self, fut: H2Stream<F, B, E>)

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> CloneToUninit for TokioExecutor where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for TokioExecutor

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for TokioExecutor

impl<T> ToOwned for TokioExecutor where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T> WithSubscriber for TokioExecutor

impl<T, U> Into<U> for TokioExecutor 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 TokioExecutor where U: Into<T>,

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

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

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