Enum mqtt_async_client::util::TokioRuntime[][src]

pub enum TokioRuntime {
    Default,
    Handle(Handle),
}

Represents a tokio runtime on which to spawn tasks.

Variants

Default

Represents the default global tokio runtime, i.e. to use tokio::spawn

Handle(Handle)

Encapsulates a tokio::runtime::Handle to use to spawn tasks.

Implementations

impl TokioRuntime[src]

pub fn spawn<F>(&self, f: F) -> JoinHandle<F::Output> where
    F: Future + Send + 'static,
    F::Output: Send + 'static, 
[src]

Spawn a task onto the selected tokio runtime.

Trait Implementations

impl Clone for TokioRuntime[src]

impl Debug for TokioRuntime[src]

impl Default for TokioRuntime[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.