Async stream for Rust and the futures crate.
APACHE-2.0 License
Bot releases are hidden (Show)
Published by taiki-e over 4 years ago
All macros can now compile with forbid(unsafe_code)
.
Support overlapping lifetime names in HRTB.
Diagnostic improvements.
Published by taiki-e over 4 years ago
Published by taiki-e over 4 years ago
Some bug fixes and diagnostic improvements.
Published by taiki-e over 4 years ago
Published by taiki-e over 4 years ago
Published by taiki-e over 4 years ago
Published by taiki-e almost 5 years ago
Published by taiki-e almost 5 years ago
Published by taiki-e almost 5 years ago
futures
to 0.3.0.Published by taiki-e about 5 years ago
pin-project
to 0.4.Published by taiki-e about 5 years ago
Added async_try_stream
to support ?
operator in async stream. e.g. You can write the following:
#![feature(generators)]
use futures::stream::Stream;
use futures_async_stream::async_try_stream;
#[async_try_stream(ok = i32, error = Box<dyn std::error::Error + Send + Sync>)]
async fn foo(stream: impl Stream<Item = String>) {
#[for_await]
for x in stream {
yield x.parse()?;
}
}
Updated pin-project
to 0.4.0-alpha.9.
Published by taiki-e about 5 years ago
Published by taiki-e about 5 years ago
Removed usage of some feature gates.
Updated pin-project
to 0.4.0-alpha.4.
Published by taiki-e about 5 years ago
proc-macro2
, syn
, and quote
to 1.0.Published by taiki-e about 5 years ago
You can now use async stream functions in traits. e.g. You can write the following:
#![feature(async_await, generators)]
use futures_async_stream::async_stream;
trait Foo {
#[async_stream(boxed, item = u32)]
async fn method(&mut self);
}
struct Bar(u32);
impl Foo for Bar {
#[async_stream(boxed, item = u32)]
async fn method(&mut self) {
while self.0 < u32::max_value() {
self.0 += 1;
yield self.0;
}
}
}
Published by taiki-e about 5 years ago
Initial release