backlink io docs

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
yoshuawuyts-patch-1
Yoshua Wuyts 5 years ago
parent a3a740c14a
commit 4475a229d6
No known key found for this signature in database
GPG Key ID: 24EA8164F96777ED

@ -28,9 +28,10 @@ pub fn empty() -> Empty {
/// A reader that contains no data.
///
/// This reader is constructed by the [`sink`] function.
/// This reader is created by the [`empty`] function. See its
/// documentation for more.
///
/// [`sink`]: fn.sink.html
/// [`empty`]: fn.empty.html
pub struct Empty {
_private: (),
}

@ -29,7 +29,8 @@ pub fn repeat(byte: u8) -> Repeat {
/// A reader which yields one byte over and over and over and over and over and...
///
/// This reader is constructed by the [`repeat`] function.
/// This reader is created by the [`repeat`] function. See its
/// documentation for more.
///
/// [`repeat`]: fn.repeat.html
pub struct Repeat {

@ -25,7 +25,8 @@ pub fn sink() -> Sink {
/// A writer that consumes and drops all data.
///
/// This writer is constructed by the [`sink`] function.
/// This writer is constructed by the [`sink`] function. See its documentation
/// for more.
///
/// [`sink`]: fn.sink.html
pub struct Sink {

@ -11,6 +11,12 @@ use crate::task::{blocking, Context, JoinHandle, Poll};
///
/// [`std::io::stderr`]: https://doc.rust-lang.org/std/io/fn.stderr.html
///
/// ### Note: Windows Portability Consideration
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
///
/// # Examples
///
/// ```no_run
@ -34,12 +40,16 @@ pub fn stderr() -> Stderr {
/// A handle to the standard error of the current process.
///
/// Created by the [`stderr`] function.
/// This writer is created by the [`stderr`] function. See its documentation for
/// more.
///
/// ### Note: Windows Portability Consideration
///
/// This type is an async version of [`std::io::Stderr`].
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
///
/// [`stderr`]: fn.stderr.html
/// [`std::io::Stderr`]: https://doc.rust-lang.org/std/io/struct.Stderr.html
#[derive(Debug)]
pub struct Stderr(Mutex<State>);

@ -11,6 +11,12 @@ use crate::task::{blocking, Context, JoinHandle, Poll};
///
/// [`std::io::stdin`]: https://doc.rust-lang.org/std/io/fn.stdin.html
///
/// ### Note: Windows Portability Consideration
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
///
/// # Examples
///
/// ```no_run
@ -35,12 +41,16 @@ pub fn stdin() -> Stdin {
/// A handle to the standard input of the current process.
///
/// Created by the [`stdin`] function.
/// This reader is created by the [`stdin`] function. See its documentation for
/// more.
///
/// ### Note: Windows Portability Consideration
///
/// This type is an async version of [`std::io::Stdin`].
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
///
/// [`stdin`]: fn.stdin.html
/// [`std::io::Stdin`]: https://doc.rust-lang.org/std/io/struct.Stdin.html
#[derive(Debug)]
pub struct Stdin(Mutex<State>);

@ -11,6 +11,12 @@ use crate::task::{blocking, Context, JoinHandle, Poll};
///
/// [`std::io::stdout`]: https://doc.rust-lang.org/std/io/fn.stdout.html
///
/// ### Note: Windows Portability Consideration
///
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
///
/// # Examples
///
/// ```no_run
@ -34,12 +40,16 @@ pub fn stdout() -> Stdout {
/// A handle to the standard output of the current process.
///
/// Created by the [`stdout`] function.
/// This writer is created by the [`stdout`] function. See its documentation
/// for more.
///
/// ### Note: Windows Portability Consideration
///
/// This type is an async version of [`std::io::Stdout`].
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
///
/// [`stdout`]: fn.stdout.html
/// [`std::io::Stdout`]: https://doc.rust-lang.org/std/io/struct.Stdout.html
#[derive(Debug)]
pub struct Stdout(Mutex<State>);

@ -32,7 +32,7 @@ where
/// This stream is created by the [`repeat`] function. See its
/// documentation for more.
///
/// [`repeat`]: fn.once.html
/// [`repeat`]: fn.repeat.html
#[derive(Debug)]
pub struct Repeat<T> {
item: T,

Loading…
Cancel
Save