Skip to content

Commit 4475a22

Browse files
committed
backlink io docs
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent a3a740c commit 4475a22

File tree

7 files changed

+47
-14
lines changed

7 files changed

+47
-14
lines changed

src/io/empty.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ pub fn empty() -> Empty {
2828

2929
/// A reader that contains no data.
3030
///
31-
/// This reader is constructed by the [`sink`] function.
31+
/// This reader is created by the [`empty`] function. See its
32+
/// documentation for more.
3233
///
33-
/// [`sink`]: fn.sink.html
34+
/// [`empty`]: fn.empty.html
3435
pub struct Empty {
3536
_private: (),
3637
}

src/io/repeat.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ pub fn repeat(byte: u8) -> Repeat {
2929

3030
/// A reader which yields one byte over and over and over and over and over and...
3131
///
32-
/// This reader is constructed by the [`repeat`] function.
32+
/// This reader is created by the [`repeat`] function. See its
33+
/// documentation for more.
3334
///
3435
/// [`repeat`]: fn.repeat.html
3536
pub struct Repeat {

src/io/sink.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ pub fn sink() -> Sink {
2525

2626
/// A writer that consumes and drops all data.
2727
///
28-
/// This writer is constructed by the [`sink`] function.
28+
/// This writer is constructed by the [`sink`] function. See its documentation
29+
/// for more.
2930
///
3031
/// [`sink`]: fn.sink.html
3132
pub struct Sink {

src/io/stderr.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ use crate::task::{blocking, Context, JoinHandle, Poll};
1111
///
1212
/// [`std::io::stderr`]: https://doc.rust-lang.org/std/io/fn.stderr.html
1313
///
14+
/// ### Note: Windows Portability Consideration
15+
///
16+
/// When operating in a console, the Windows implementation of this stream does not support
17+
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
18+
/// an error.
19+
///
1420
/// # Examples
1521
///
1622
/// ```no_run
@@ -34,12 +40,16 @@ pub fn stderr() -> Stderr {
3440

3541
/// A handle to the standard error of the current process.
3642
///
37-
/// Created by the [`stderr`] function.
43+
/// This writer is created by the [`stderr`] function. See its documentation for
44+
/// more.
45+
///
46+
/// ### Note: Windows Portability Consideration
3847
///
39-
/// This type is an async version of [`std::io::Stderr`].
48+
/// When operating in a console, the Windows implementation of this stream does not support
49+
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
50+
/// an error.
4051
///
4152
/// [`stderr`]: fn.stderr.html
42-
/// [`std::io::Stderr`]: https://doc.rust-lang.org/std/io/struct.Stderr.html
4353
#[derive(Debug)]
4454
pub struct Stderr(Mutex<State>);
4555

src/io/stdin.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ use crate::task::{blocking, Context, JoinHandle, Poll};
1111
///
1212
/// [`std::io::stdin`]: https://doc.rust-lang.org/std/io/fn.stdin.html
1313
///
14+
/// ### Note: Windows Portability Consideration
15+
///
16+
/// When operating in a console, the Windows implementation of this stream does not support
17+
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
18+
/// an error.
19+
///
1420
/// # Examples
1521
///
1622
/// ```no_run
@@ -35,12 +41,16 @@ pub fn stdin() -> Stdin {
3541

3642
/// A handle to the standard input of the current process.
3743
///
38-
/// Created by the [`stdin`] function.
44+
/// This reader is created by the [`stdin`] function. See its documentation for
45+
/// more.
46+
///
47+
/// ### Note: Windows Portability Consideration
3948
///
40-
/// This type is an async version of [`std::io::Stdin`].
49+
/// When operating in a console, the Windows implementation of this stream does not support
50+
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
51+
/// an error.
4152
///
4253
/// [`stdin`]: fn.stdin.html
43-
/// [`std::io::Stdin`]: https://doc.rust-lang.org/std/io/struct.Stdin.html
4454
#[derive(Debug)]
4555
pub struct Stdin(Mutex<State>);
4656

src/io/stdout.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ use crate::task::{blocking, Context, JoinHandle, Poll};
1111
///
1212
/// [`std::io::stdout`]: https://doc.rust-lang.org/std/io/fn.stdout.html
1313
///
14+
/// ### Note: Windows Portability Consideration
15+
///
16+
/// When operating in a console, the Windows implementation of this stream does not support
17+
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
18+
/// an error.
19+
///
1420
/// # Examples
1521
///
1622
/// ```no_run
@@ -34,12 +40,16 @@ pub fn stdout() -> Stdout {
3440

3541
/// A handle to the standard output of the current process.
3642
///
37-
/// Created by the [`stdout`] function.
43+
/// This writer is created by the [`stdout`] function. See its documentation
44+
/// for more.
45+
///
46+
/// ### Note: Windows Portability Consideration
3847
///
39-
/// This type is an async version of [`std::io::Stdout`].
48+
/// When operating in a console, the Windows implementation of this stream does not support
49+
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
50+
/// an error.
4051
///
4152
/// [`stdout`]: fn.stdout.html
42-
/// [`std::io::Stdout`]: https://doc.rust-lang.org/std/io/struct.Stdout.html
4353
#[derive(Debug)]
4454
pub struct Stdout(Mutex<State>);
4555

src/stream/repeat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ where
3232
/// This stream is created by the [`repeat`] function. See its
3333
/// documentation for more.
3434
///
35-
/// [`repeat`]: fn.once.html
35+
/// [`repeat`]: fn.repeat.html
3636
#[derive(Debug)]
3737
pub struct Repeat<T> {
3838
item: T,

0 commit comments

Comments
 (0)