future_form 0.3.1

Abstractions over Send and !Send futures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::marker::PhantomData;
use future_form::{FutureForm, future_form};

struct InherentType<K> {
    val: u32,
    _marker: PhantomData<K>,
}

#[future_form(Sendable, Local)]
impl<K: FutureForm> InherentType<K> {
    fn get_value(&self) -> K::Future<'_, u32> {
        let val = self.val;
        K::from_future(async move { val })
    }
}

fn main() {}