Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let outbound = async_stream::stream! {
- for _ in 0..10 {
- let hello = String::from("hello");
- let bytes = hello.as_bytes();
- yield Bytes { bytes: bytes.to_vec() };
- time::delay_for(Duration::from_secs(1)).await;
- }
- };
- let response = client.connect_to_server(Request::new(outbound)).await?;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement