use std::future::Future; fn main() { let handle: Box> = get_handler(); } fn get_handler() -> Box> { let f = async { "name".to_string() }; Box::new(f) }