Minimal and reusable non-blocking I/O layer
This project is developed and maintained by the HAL team.
The ultimate goal of this crate is code reuse. With this crate you can write core I/O APIs that can then be adapted to operate in either blocking or non-blocking manner. Furthermore those APIs are not tied to a particular asynchronous model and can be adapted to work with the futures
model or with the async
/ await
model.
The WouldBlock
error variant signals that the operation can't be completed right now and would need to block to complete. WouldBlock
is a special error in the sense that it's not fatal; the operation can still be completed by retrying again later.
nb::Result
is based on the API of std::io::Result
, which has a WouldBlock
variant in its ErrorKind
.
We can map WouldBlock
to different blocking and non-blocking models:
WouldBlock
means try again right now, i.e. busy waiting.async
mode, WouldBlock
means Poll::Pending
.This crate is guaranteed to compile on stable Rust 1.62 and up. It might compile with older versions but that may change in any new patch release.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the HAL team, promises to intervene to uphold that code of conduct.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4