Skip to main content

SpawnableWithReturn

Trait SpawnableWithReturn 

Source
pub trait SpawnableWithReturn<Out: Spawnable>:
    'static
    + Send
    + FnOnce() -> Out { }
Expand description

An async func that accepts a generic argument and returns a generic value

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Out: Spawnable, T: 'static + Send + FnOnce() -> Out> SpawnableWithReturn<Out> for T