summaryrefslogtreecommitdiffstats
path: root/tokio/src/io/util/async_write_ext.rs
AgeCommit message (Collapse)Author
2020-10-21io: add `AsyncReadExt::read_buf` (#3003)Carl Lerche
Brings back `read_buf` from 0.2. This will be stabilized as part of 1.0.
2020-09-24io: remove poll_{read,write}_buf from traits (#2882)Carl Lerche
These functions have object safety issues. It also has been decided to avoid vectored operations on the I/O traits. A later PR will bring back vectored operations on specific types that support them. Refs: #2879, #2716
2020-07-24net: ensure that unix sockets have both split and into_split (#2687)Alice Ryhl
The documentation build failed with errors such as error: `[read]` public documentation for `take` links to a private item --> tokio/src/io/util/async_read_ext.rs:1078:9 | 1078 | / /// Creates an adaptor which reads at most `limit` bytes from it. 1079 | | /// 1080 | | /// This function returns a new instance of `AsyncRead` which will read 1081 | | /// at most `limit` bytes, after which it will always return EOF ... | 1103 | | /// } 1104 | | /// ``` | |_______________^ | note: the lint level is defined here --> tokio/src/lib.rs:13:9 | 13 | #![deny(intra_doc_link_resolution_failure)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: the link appears in this line: bytes read and future calls to [`read()`][read] may succeed.
2020-07-16io: add little endian variants for AsyncRead/WriteExt (#1915)Evan Cameron
2020-06-12io: fix unsound pin projection in read_buf and write_buf (#2612)Taiki Endo
2020-01-24docs: use third form in API docs (#2027)Oleg Nosov
2019-12-21chore: fix formatting, remove old rustfmt.toml (#2007)Artem Vorotnikov
`cargo fmt` has a bug where it does not format modules scoped with feature flags.
2019-12-02io: add async fns for reading / writing bufs (#1881)Carl Lerche
Adds `read_buf` and `write_buf` which work with `T: BufMut` and `T: Buf` respectively. This adds an easy API for using the buffer traits provided by `bytes.
2019-11-30io: read/write big-endian numbers (#1863)Carl Lerche
Provide convenience methods for encoding and decoding big-endian numbers on top of asynchronous I/O streams. Only primitive types are provided (24 and 48 bit numbers are omitted). In general, using these methods won't be the fastest way to do encoding/decoding with asynchronous byte streams, but they help to get simple things working fast.
2019-11-23docs: improve tokio::io API documentation (#1815)Carl Lerche
Adds method level documentation for `tokio::io`.
2019-11-22docs: annotate io mod with doc_cfg (#1808)Carl Lerche
Annotates types in `tokio::io` module with their required feature flag. This annotation is included in generated documentation. Notes: * The annotation must be on the type or function itself. Annotating just the re-export is not sufficient. * The annotation must be **inside** the `pin_project!` macro or it is lost.
2019-11-15Limit `futures` dependency to `Stream` via feature flag (#1774)Carl Lerche
In an effort to reach API stability, the `tokio` crate is shedding its _public_ dependencies on crates that are either a) do not provide a stable (1.0+) release with longevity guarantees or b) match the `tokio` release cadence. Of course, implementing `std` traits fits the requirements. The on exception, for now, is the `Stream` trait found in `futures_core`. It is expected that this trait will not change much and be moved into `std. Since Tokio is not yet going reaching 1.0, I feel that it is acceptable to maintain a dependency on this trait given how foundational it is. Since the `Stream` implementation is optional, types that are logically streams provide `async fn next_*` functions to obtain the next value. Avoiding the `next()` name prevents fn conflicts with `StreamExt::next()`. Additionally, some misc cleanup is also done: - `tokio::io::io` -> `tokio::io::util`. - `delay` -> `delay_until`. - `Timeout::new` -> `timeout(...)`. - `signal::ctrl_c()` returns a future instead of a stream. - `{tcp,unix}::Incoming` is removed (due to lack of `Stream` trait). - `time::Throttle` is removed (due to lack of `Stream` trait). - Fix: `mpsc::UnboundedSender::send(&self)` (no more conflict with `Sink` fns).