Commit Graph

568 Commits (write-by-ref)
 

Author SHA1 Message Date
dignifiedquire dc6c8fb131 feat(io): add stub for BufRead for Take 5 years ago
dignifiedquire d9aec105a1 feat(io): implement Read::chain 5 years ago
dignifiedquire e681e297ef feat(io): implement Read::bytes 5 years ago
dignifiedquire f751ebb8c4 feat(io): implement Read::by_ref 5 years ago
dignifiedquire 75dc819b2f feat(io): implement Read::take 5 years ago
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>
5 years ago
bors[bot] a2744e3f69
Merge #228
228: Create readme in examples directory r=stjepang a=nonnontrivial

fixes #169 

Co-authored-by: Kevin Donahue <nonnontrivial@gmail.com>
5 years ago
bors[bot] 65b9e62e13
Merge #243
243: future docs r=stjepang a=yoshuawuyts

Docs for futures concurrency. We currently don't have anything, and I figured this would be helpful in pointing folks in the right direction. Thanks!

## Screenshot

![Screenshot_2019-09-27 async_std future - Rust](https://user-images.githubusercontent.com/2467194/65730755-3c836780-e0c3-11e9-9bc5-fbf400cec7b2.png)


Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Stjepan Glavina 184427cc0b fix a bug in .travis.yml 5 years ago
Stjepan Glavina 414fadd6e6 cargo fmt 5 years ago
Kevin Donahue e8bd79efb8 add remaining examples 5 years ago
Yoshua Wuyts 70069e0014
future docs
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Stjepan Glavina 8e32fd09f3 Fix a doc test 5 years ago
Stjepan Glavina ff028bb540 Improve compile times and add comments 5 years ago
Yoshua Wuyts cc767228f7
Merge pull request #239 from async-rs/prep-0.99.7
v0.99.7
5 years ago
Yoshua Wuyts fdc8fe624d
Merge pull request #242 from async-rs/barrier-unstable
mark sync::Barrier as unstable
5 years ago
Yoshua Wuyts 0b39306b74
fix barrier tests
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts b2d16b613d
v0.99.7
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts c23cc769ee
mark sync::Barrier as unstable
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Stjepan Glavina 79eab9eb9a Simplify extension traits using a macro 5 years ago
Yoshua Wuyts 0f0b3548a7
Merge pull request #240 from dignifiedquire/sync-barrier
feat: implement sync::Barrier
5 years ago
Kevin Donahue ac9d0df7c2 add logging and print file examples 5 years ago
dignifiedquire b77b72d333 feat: implement sync::Barrier
Based on the implementation in https://github.com/tokio-rs/tokio/pull/1571
5 years ago
Kevin Donahue 25185da76d add inline example 5 years ago
Kevin Donahue 3db7631a7d create readme in examples directory 5 years ago
Yoshua Wuyts 785371cbc4
Merge pull request #187 from async-rs/join-macros
add future::{join,try_join,select,try_select} macros
5 years ago
Yoshua Wuyts 553e48057f
Merge pull request #133 from yoshuawuyts/ready_macro
expose `task::ready!`
5 years ago
Yoshua Wuyts 90872dd06f
Merge pull request #92 from Drevoed/buf-writer
draft Buf writer
5 years ago
Kirill Mironov 63154f5b7a cargo fmt 5 years ago
Kirill Mironov d23af83189 removed LineWriter and implemented requested changes
Signed-off-by: Kirill Mironov <k.mironov@albato.ru>
5 years ago
Kirill Mironov 9509a056bd Merge branch 'master' into buf-writer 5 years ago
bors[bot] f922e9c034
Merge #236
236: Fix stream_extend compilation failures r=stjepang a=stjepang



Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
5 years ago
Stjepan Glavina 293d992de1 Fix stream_extend compilation failures 5 years ago
Yoshua Wuyts a1bc097ffd
Merge pull request #211 from tirr-c/stream-extend
Add stream::Extend
5 years ago
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>
5 years ago
Stjepan Glavina c62b7a0ba9 Fix warnings 5 years ago
Stjepan Glavina 73d7fea937 Re-export Stream from futures 5 years ago
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>
5 years ago
Stjepan Glavina 85b80cfe9a Fuse futures in select! 5 years ago
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>
5 years ago
Stjepan Glavina 17534cfffc Fuse next() future 5 years ago
Fedor Sakharov 2a2a473889
adds stream::chain combinator 5 years ago
Stjepan Glavina d55cfb1da8 impl FusedStream for Fuse 5 years ago
Stjepan Glavina 0e3c47c3bf Fix imports in docs 5 years ago
Stjepan Glavina 797a6b2d90 Add a missing assert in a doc example 5 years ago
Stjepan Glavina bfab20da03 Don't re-export ext traits in async_std::io 5 years ago
Stjepan Glavina 217e435e8e Fix more compilation errors in the book 5 years ago
Stjepan Glavina f2ca3f37a9 Fix build errors in docs 5 years ago
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>
5 years ago
Fedor Sakharov 89fd473da0
fixes merge artifacts in stream docs 5 years ago