Kevin Donahue
e8bd79efb8
add remaining examples
2019-09-26 20:57:56 -04:00
Kevin Donahue
ac9d0df7c2
add logging and print file examples
2019-09-25 20:21:59 -04:00
Kevin Donahue
25185da76d
add inline example
2019-09-24 17:42:18 -04:00
Kevin Donahue
3db7631a7d
create readme in examples directory
2019-09-24 17:42:18 -04: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
Yoshua Wuyts
90872dd06f
Merge pull request #92 from Drevoed/buf-writer
...
draft Buf writer
2019-09-24 22:11:48 +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
bors[bot]
f922e9c034
Merge #236
...
236: Fix stream_extend compilation failures r=stjepang a=stjepang
Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2019-09-24 03:13:46 +00: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
bors[bot]
1d2838b63b
Merge #234
...
234: Re-export Stream from futures r=stjepang a=stjepang
This is a follow-up to #224
Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2019-09-22 18:15:55 +00: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
85b80cfe9a
Fuse futures in select!
2019-09-22 15:35:53 +02:00
bors[bot]
ff7b5d3123
Merge #233
...
233: adds stream::chain combinator r=stjepang a=montekki
Adds a `Chain` combinator and Introduces some changes to `Fuse` so it's usable in this case, but those need a closer look.
---
Ref: #129
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.chain
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-22 13:24:32 +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
0e3c47c3bf
Fix imports in docs
2019-09-22 12:41:04 +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
Stjepan Glavina
217e435e8e
Fix more compilation errors in the book
2019-09-22 12:03:56 +02:00
Stjepan Glavina
f2ca3f37a9
Fix build errors in docs
2019-09-22 11:47:39 +02:00
bors[bot]
697a7207cb
Merge #230
...
230: fixes merge artifacts in stream docs r=stjepang a=montekki
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-22 06:59:36 +00: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
bors[bot]
6470130cb1
Merge #227
...
227: adds stream::inspect combinator r=stjepang a=montekki
Ref: #129
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.inspect
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-21 15:57:19 +00:00
Fedor Sakharov
bf7121d2d4
adds stream::inspect combinator
2019-09-21 18:19:47 +03:00
Fedor Sakharov
e74c0cec1f
adds stream::step_by combinator
2019-09-21 17:44:57 +03:00
bors[bot]
2acc07065c
Merge #223
...
223: adds stream::skip_while combinator r=stjepang a=montekki
Ref: #129
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.skip_while
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-21 14:44:02 +00:00
Fedor Sakharov
ea080e7305
Merge branch 'master' into fs-stream-skip-while
2019-09-21 17:42:44 +03:00
bors[bot]
99724497b3
Merge #221
...
221: adds stream::filter combinator r=stjepang a=montekki
Ref: #129
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.filter
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-21 14:22:58 +00:00
bors[bot]
47ce009e10
Merge #222
...
222: adds stream::skip combinator r=stjepang a=montekki
Ref: #129
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.skip
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2019-09-21 13:46:11 +00:00
Fedor Sakharov
fdd81e1b2a
Actually export Skip
2019-09-21 16:40:58 +03:00
Fedor Sakharov
e430851bc4
export Filter type
2019-09-21 16:40:01 +03:00
Fedor Sakharov
75da138696
export Skip type
2019-09-21 16:37:30 +03:00
Fedor Sakharov
93463e8df3
export SkipWhile type
2019-09-21 16:34:51 +03:00
Stjepan Glavina
a97d26ca13
Fix imports in the book
2019-09-21 15:22:50 +02:00
Stjepan Glavina
53ce30ae66
Fix async_std imports in metadata.rs
2019-09-21 15:17:49 +02:00
Stjepan Glavina
1fa196812a
Fix compilation errors around Stream
2019-09-21 15:05:57 +02:00
Stjepan Glavina
edfa2358a4
Re-export IO traits from futures
2019-09-21 14:30:52 +02:00
Fedor Sakharov
f9f97c43c4
adds stream::skip_while combinator
2019-09-21 15:12:41 +03:00
Fedor Sakharov
570329b176
adds stream::skip combinator
2019-09-21 14:40:25 +03:00
Fedor Sakharov
e7ae10ebee
adds stream::filter combinator
2019-09-21 14:03:17 +03:00
Oleksii Kachaiev
55ea367415
Rename server functions to follow *_loop convention ( #139 )
...
Rename: server -> accept_loop, client -> connection_loop, client_writer -> connection_writer_loop
2019-09-20 09:54:48 +03:00