[][src]Struct fast_threadpool::ThreadPoolAsyncHandler

pub struct ThreadPoolAsyncHandler<Shared: 'static + Clone + Send> { /* fields omitted */ }

Asynchronous handler to execute jobs on the thread pool

Implementations

impl<Shared: 'static + Clone + Send> ThreadPoolAsyncHandler<Shared>[src]

pub async fn execute<F, R>(&self, f: F) -> Result<R, ThreadPoolDisconnected> where
    F: 'static + Send + FnOnce(&Shared) -> R,
    R: 'static + Send + Sync
[src]

Execute the given closure and return a Future that output closure return type

Trait Implementations

impl<Shared: Clone + 'static + Send> Clone for ThreadPoolAsyncHandler<Shared>[src]

impl<Shared: Debug + 'static + Clone + Send> Debug for ThreadPoolAsyncHandler<Shared>[src]

Auto Trait Implementations

impl<Shared> !RefUnwindSafe for ThreadPoolAsyncHandler<Shared>[src]

impl<Shared> Send for ThreadPoolAsyncHandler<Shared>[src]

impl<Shared> Sync for ThreadPoolAsyncHandler<Shared>[src]

impl<Shared> Unpin for ThreadPoolAsyncHandler<Shared>[src]

impl<Shared> !UnwindSafe for ThreadPoolAsyncHandler<Shared>[src]

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.