Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tracking] io #131

Closed
57 of 59 tasks
yoshuawuyts opened this issue Aug 30, 2019 · 4 comments · Fixed by #633
Closed
57 of 59 tasks

[tracking] io #131

yoshuawuyts opened this issue Aug 30, 2019 · 4 comments · Fixed by #633
Labels
enhancement New feature or request
Milestone

Comments

@yoshuawuyts
Copy link
Contributor

yoshuawuyts commented Aug 30, 2019

Similar to #129 for streams, this issue tracks what's left to port from std::io to async_std::io.

Top-level exports

  • prelude

Free functions

  • copy
  • empty
  • repeat
  • sink
  • stderr
  • stdin
  • stdout

Structs

  • BufReader
  • BufWriter
  • Bytes
  • Chain
  • Cursor
  • Empty
  • Error
  • IntoInnerError
  • IoSlice
  • IoSliceMut
  • LineWriter
  • Lines
  • Repeat
  • Sink
  • Split
  • Stderr
  • StderrLock
  • Stdin
  • StdinLock
  • Stdout
  • StdoutLock
  • Take

Read methods

  • Read::by_ref
  • Read::bytes
  • Read::chain
  • Read::read_exact
  • Read::read_to_end
  • Read::read_to_string
  • Read::read_vectored
  • Read::take

Write methods

  • Write::by_ref
  • Write::write_all
  • Write::write_fmt
  • Write::write_vectored

BufRead methods

  • BufRead::buffer
  • BufRead::consume
  • BufRead::lines
  • BufRead::read_line
  • BufRead::read_until
  • BufRead::split

BufWriter methods

  • BufWriter::buffer
  • BufWriter::get_mut
  • BufWriter::get_ref
  • BufWriter::into_inner
  • BufWriter::new
  • BufWriter::with_capacity

BufReader methods

  • BufReader::fill_buf
  • BufReader::get_mut
  • BufReader::get_ref
  • BufReader::into_inner
  • BufReader::new
  • BufReader::with_capacity
@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Aug 30, 2019
This was referenced Aug 30, 2019
@taiki-e
Copy link
Contributor

taiki-e commented Aug 31, 2019

Note that this list contains unstable APIs.

@yoshuawuyts
Copy link
Contributor Author

@taiki-e ah dang, you're right. Perhaps we should keep those out for now.

@yoshuawuyts
Copy link
Contributor Author

Gone and filtered out all the experimental APIs!

bors bot added a commit that referenced this issue Sep 8, 2019
151: Split io into multiple files r=stjepang a=yoshuawuyts

Counterpart to #150, splits `io::read` and `io::write` into multiple files. This is useful to prevent a single file from becoming hard to navigate as we add more combinators. No other changes were made. Ref #131. Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This was referenced Sep 8, 2019
bors bot added a commit that referenced this issue Sep 11, 2019
176: Add BufRead::fill_buf r=stjepang a=tirr-c

Tracking issue: #131. Docs from `std`.

**Note** that there is a use of `unsafe` in `fill_buf.rs` that transmutes the lifetime of output buffer.

Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
bors bot added a commit that referenced this issue Sep 16, 2019
171: Add BufRead::consume r=stjepang a=yoshuawuyts

Ref #131. This implements `BufReader::consume`. Thanks!


Note on `fill_buf`: I couldn't get the `async fn fill_buf()` to work, but tracked progress for it here: https://gist.github.com/yoshuawuyts/09bbdc7823225ca96b5e35cd1da5d581. Got some lifetimes isssues. If anyone wants to give this a shot, please do!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This was referenced Sep 16, 2019
bors bot added a commit that referenced this issue Sep 16, 2019
190: Clean up the fs module and a few other places r=stjepang a=stjepang

Just a cleanup for various pieces of documentation, mainly around the `lib.rs` docs, the prelude, and the `fs` module. Some small bugs are also fixed along the way.

This PR is the first one in a series of review PRs that I will be submitting before the upcoming 1.0 release.

200: expose IoSlice, IoSliceMut r=stjepang a=yoshuawuyts

Exposes `io::IoSlice` and `io::IoSliceMut`. Given we're returning these from `read_vectored` and `write_vectored` it might make sense to just include them as part of our re-exports. Thanks!

Ref #131.

Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
bors bot added a commit that referenced this issue Sep 18, 2019
167: add io::cursor r=stjepang a=yoshuawuyts

Adds `io::Cursor` and makes it so `io::prelude::*` behaves the way it does in std (so it can actually be implemented - though this might just have been a bug on my side??).

Ref #131. Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
@yoshuawuyts yoshuawuyts added this to the std parity milestone Sep 19, 2019
This was referenced Sep 27, 2019
bors bot added a commit that referenced this issue Sep 28, 2019
245: feat: missing Read and Write methods r=yoshuawuyts a=dignifiedquire

Ref: #131 

- [x] Read::by_ref
- [x] Read::bytes
- [x] Read::chain
- [x] Read::take
- [ ] Write::by_ref
- [ ] ~~Write::write_fmt~~ postponed until #247 is solved

Needs fixing:

- [x] `BufRead` for `Take`
- [x] `BufRead` for `Chain`
- [ ] `by_ref` conflict between `Read` and `Write`, unable to add both, as they conflict, and the current state of things does not allow to differentiate between the two.


Co-authored-by: dignifiedquire <dignifiedquire@users.noreply.github.com>
@dignifiedquire
Copy link
Member

Missing exports for the return values of

  • io::Read::take
  • io::Read::bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants