[][src]Struct tokio_current_thread::TaskExecutor

pub struct TaskExecutor { /* fields omitted */ }

Executes futures on the current thread.

All futures executed using this executor will be executed on the current thread. As such, run will wait for these futures to complete before returning.

For more details, see the module level documentation.

Methods

impl TaskExecutor[src]

pub fn current() -> TaskExecutor[src]

Returns an executor that executes futures on the current thread.

The user of TaskExecutor must ensure that when a future is submitted, that it is done within the context of a call to run.

For more details, see the module level documentation.

pub fn spawn_local(
    &mut self,
    future: Box<dyn Future<Item = (), Error = ()>>
) -> Result<(), SpawnError>
[src]

Spawn a future onto the current CurrentThread instance.

Trait Implementations

impl Clone for TaskExecutor[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TaskExecutor[src]

impl<F> Executor<F> for TaskExecutor where
    F: Future<Item = (), Error = ()> + 'static, 
[src]

impl Executor for TaskExecutor[src]

fn status(&self) -> Result<(), SpawnError>[src]

Provides a best effort hint to whether or not spawn will succeed. Read more

impl<F> TypedExecutor<F> for TaskExecutor where
    F: Future<Item = (), Error = ()> + 'static, 
[src]

fn status(&self) -> Result<(), SpawnError>[src]

Provides a best effort hint to whether or not spawn will succeed. Read more

Auto Trait Implementations

impl !Send for TaskExecutor

impl !Sync for TaskExecutor

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.