Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(async_await)]
- #![allow(unused_variables, dead_code)]
- use futures::future::{self, Future, FutureExt};
- fn main() {
- let result = run();
- }
- async fn run() -> String {
- let mut input = input_data().await;
- let nodes: Vec<Node> = Vec::new();
- for node in nodes {
- input = node.run(input);
- }
- input
- }
- async fn input_data() -> String {
- String::new()
- }
- struct Node {
- id: i32,
- }
- impl Node {
- fn run(&self, s: String) -> String {
- format!("{}, {}", s, id)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement