3 ms·
No, the code you're looking at is using a bunch of macros to implement an embeded DSL on top of Rust. For example this: #[get("/echo")] fn echo_stream
by duped 3y ago
No, the code you're looking at is using a bunch of macros to implement an embeded DSL on top of Rust.
For example this:
#[get("/echo")]
fn echo_stream(ws: WebSocket) -> Stream!['static] {
Stream! { ws =>
for await message in ws {
yield message?;
}
}
}
Is not valid Rust code. The `for await message in ws` is particularly egregious.