Yoshua Wuyts
5bd6acde46
Merge pull request #263 from montekki/fs-stream-map
...
Adds stream map combinator
2019-10-03 00:45:27 +02:00
Yoshua Wuyts
50b6d0b15f
Merge pull request #269 from montekki/fs-stream-try-for-each
...
Adds try_for_each combinator
2019-10-02 19:36:04 +02:00
bors[bot]
98c79f4ff9
Merge #255
...
255: Update futures-preview to 0.3.0-alpha.19 r=skade a=taiki-e
Depends on https://github.com/rustasync/surf/pull/74
Refs:
* https://github.com/rust-lang-nursery/futures-rs/issues/1761
* https://github.com/rust-lang-nursery/futures-rs/pull/1845
cc @skade @stjepang @yoshuawuyts
Co-authored-by: Taiki Endo <te316e89@gmail.com>
2019-10-01 21:15:00 +00:00
Fedor Sakharov
35ab65fe8e
Fix docs
2019-10-01 20:07:56 +03:00
Fedor Sakharov
f4e2302e7e
Don't use Try trait, use Result instead
2019-10-01 18:08:39 +03:00
Yoshua Wuyts
a97a1fffff
Merge pull request #264 from montekki/fs-stream-for-each
...
Adds for_each stream combinator
2019-10-01 15:32:36 +02:00
Fedor Sakharov
66d38f7856
Adds try_for_each combinator
2019-10-01 10:39:43 +03:00
Sunjay Varma
a05b564486
rustfmt
2019-09-30 20:14:16 -04:00
Sunjay Varma
fb7582bd7a
Using Box::pin(...) instead of Pin::from(Box::new(...))
2019-09-30 19:42:30 -04:00
Sunjay Varma
ab7129cd45
FromStream for Vec<T> in terms of Extend
2019-09-30 19:42:30 -04:00
Sunjay Varma
76b10c4784
FromStream for Option<T>
2019-09-30 19:42:30 -04:00
Fedor Sakharov
6da7efc5ac
Adds for_each stream combinator
2019-09-30 23:45:00 +03:00
Fedor Sakharov
658a16bebe
Adds stream map combinator
2019-09-30 23:17:25 +03:00
Yoshua Wuyts
06862d47c3
update Barrier example to match std::sync::Barrier 1:1
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-09-29 04:21:48 +02:00
Taiki Endo
f0bf66d0df
Update futures-preview to 0.3.0-alpha.19
2019-09-29 00:38:49 +09:00
dignifiedquire
064b44f695
apply cr
2019-09-27 18:49:23 -06:00
dignifiedquire
a1aa3f823d
finish BufRead
2019-09-27 18:59:30 +02:00
dignifiedquire
dc6c8fb131
feat(io): add stub for BufRead for Take
2019-09-27 16:36:55 +02:00
dignifiedquire
d9aec105a1
feat(io): implement Read::chain
2019-09-27 16:30:38 +02:00
dignifiedquire
e681e297ef
feat(io): implement Read::bytes
2019-09-27 15:14:24 +02:00
dignifiedquire
f751ebb8c4
feat(io): implement Read::by_ref
2019-09-27 15:10:40 +02:00
dignifiedquire
75dc819b2f
feat(io): implement Read::take
2019-09-27 15:07:05 +02:00
bors[bot]
f6a2393fb5
Merge #241
...
241: Simplify extension traits using a macro r=yoshuawuyts a=stjepang
This PR would fix #235
Async methods in our extension traits are now written in the simpler `-> impl Future<Output = T> [ConcreteFuture<Self>]` style. At the same time, doc tests are used even when the `docs` feature is not enabled.
Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2019-09-27 11:36:32 +00:00
Stjepan Glavina
414fadd6e6
cargo fmt
2019-09-26 23:13:02 -04:00
Yoshua Wuyts
70069e0014
future docs
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-09-27 01:07:55 +02:00
Stjepan Glavina
8e32fd09f3
Fix a doc test
2019-09-26 14:31:02 -04:00
Stjepan Glavina
ff028bb540
Improve compile times and add comments
2019-09-26 14:21:27 -04:00
Yoshua Wuyts
0b39306b74
fix barrier tests
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-09-26 17:24:24 +02:00
Yoshua Wuyts
c23cc769ee
mark sync::Barrier as unstable
...
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-09-26 16:34:44 +02:00
Stjepan Glavina
79eab9eb9a
Simplify extension traits using a macro
2019-09-26 07:46:29 -04:00
dignifiedquire
b77b72d333
feat: implement sync::Barrier
...
Based on the implementation in https://github.com/tokio-rs/tokio/pull/1571
2019-09-25 21:10:06 +02:00
Yoshua Wuyts
785371cbc4
Merge pull request #187 from async-rs/join-macros
...
add future::{join,try_join,select,try_select} macros
2019-09-24 22:18:26 +02:00
Yoshua Wuyts
553e48057f
Merge pull request #133 from yoshuawuyts/ready_macro
...
expose `task::ready!`
2019-09-24 22:16:20 +02:00
Kirill Mironov
63154f5b7a
cargo fmt
2019-09-24 16:33:02 +03:00
Kirill Mironov
d23af83189
removed LineWriter and implemented requested changes
...
Signed-off-by: Kirill Mironov <k.mironov@albato.ru>
2019-09-24 15:59:46 +03:00
Kirill Mironov
9509a056bd
Merge branch 'master' into buf-writer
2019-09-24 15:03:55 +03:00
Stjepan Glavina
293d992de1
Fix stream_extend compilation failures
2019-09-24 05:13:02 +02:00
Yoshua Wuyts
a1bc097ffd
Merge pull request #211 from tirr-c/stream-extend
...
Add stream::Extend
2019-09-23 00:14:29 +02:00
Stjepan Glavina
c62b7a0ba9
Fix warnings
2019-09-22 17:06:00 +02:00
Stjepan Glavina
73d7fea937
Re-export Stream from futures
2019-09-22 16:51:18 +02:00
bors[bot]
33ff41df48
Merge #224
...
224: Re-export IO traits from futures r=stjepang a=stjepang
Sorry for the big PR!
Instead of providing our own traits `async_std::io::{Read, Write, Seek, BufRead}`, we now re-export `futures::io::{AsyncRead, AsyncWrite, AsyncSeek, AsyncRead}`. While re-exporting we rename them to strip away the "Async" prefix.
The documentation will display the contents of the original traits from the `futures` crate together with our own extension methods. There's a note in the docs saying the extenion methods become available only when `async_std::prelude::*` is imported.
Our extension traits are re-exported into the prelude, but are marked with `#[doc(hidden)]` so they're completely invisible to users.
The benefit of this is that people can now implement traits from `async_std::io` for their types and stay compatible with `futures`. This will also simplify some trait bounds in our APIs - for example, things like `where Self: futures_io::AsyncRead`.
At the same time, I cleaned up some trait bounds in our stream interfaces, but haven't otherwise fiddled with them much.
I intend to follow up with another PR doing the same change for `Stream` so that we re-export the stream trait from `futures`.
Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2019-09-22 13:50:53 +00:00
Stjepan Glavina
17534cfffc
Fuse next() future
2019-09-22 15:19:54 +02:00
Fedor Sakharov
2a2a473889
adds stream::chain combinator
2019-09-22 15:48:12 +03:00
Stjepan Glavina
d55cfb1da8
impl FusedStream for Fuse
2019-09-22 12:44:46 +02:00
Stjepan Glavina
797a6b2d90
Add a missing assert in a doc example
2019-09-22 12:16:35 +02:00
Stjepan Glavina
bfab20da03
Don't re-export ext traits in async_std::io
2019-09-22 12:08:08 +02:00
Fedor Sakharov
89fd473da0
fixes merge artifacts in stream docs
2019-09-22 09:51:54 +03:00
bors[bot]
a8e48b1542
Merge #226
...
226: adds stream::step_by combinator r=stjepang a=montekki
Ref: #129
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-21 16:46:50 +00:00
Fedor Sakharov
376049b51d
Merge branch 'master' into fs-stream-step-by
2019-09-21 19:07:27 +03:00
Fedor Sakharov
bf7121d2d4
adds stream::inspect combinator
2019-09-21 18:19:47 +03:00