use std::rc::Rc;
use future_form::{FutureForm, Sendable, future_form};
trait Processor<K: FutureForm> {
fn process(&self) -> K::Future<'_, u32>;
}
struct Container {
value: Rc<u32>,
}
#[future_form(Sendable)]
impl<K: FutureForm> Processor<K> for Container {
fn process(&self) -> K::Future<'_, u32> {
let value = Rc::clone(&self.value);
K::from_future(async move { *value })
}
}
fn main() {}