Skip to content

backreference links for structs #394

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

Merged
merged 2 commits into from
Oct 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/io/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: (),
}
Expand Down
3 changes: 2 additions & 1 deletion src/io/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/io/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
16 changes: 13 additions & 3 deletions src/io/stderr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>);

Expand Down
16 changes: 13 additions & 3 deletions src/io/stdin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>);

Expand Down
16 changes: 13 additions & 3 deletions src/io/stdout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>);

Expand Down
5 changes: 5 additions & 0 deletions src/stream/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ use crate::task::{Context, Poll};

/// Creates a stream that doesn't yield any items.
///
/// This `struct` is created by the [`empty`] function. See its
/// documentation for more.
///
/// [`empty`]: fn.empty.html
///
/// # Examples
///
/// ```
Expand Down
3 changes: 2 additions & 1 deletion src/stream/from_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use crate::task::{Context, Poll};
pin_project! {
/// A stream that yields elements by calling a closure.
///
/// This stream is constructed by [`from_fn`] function.
/// This stream is created by the [`from_fn`] function. See its
/// documentation for more.
///
/// [`from_fn`]: fn.from_fn.html
#[derive(Debug)]
Expand Down
4 changes: 4 additions & 0 deletions src/stream/interval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ pub fn interval(dur: Duration) -> Interval {

/// A stream representing notifications at fixed interval
///
/// This stream is created by the [`interval`] function. See its
/// documentation for more.
///
/// [`interval`]: fn.interval.html
#[cfg(feature = "unstable")]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[derive(Debug)]
Expand Down
3 changes: 2 additions & 1 deletion src/stream/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ pub fn once<T>(t: T) -> Once<T> {
pin_project! {
/// A stream that yields a single item.
///
/// This stream is constructed by the [`once`] function.
/// This stream is created by the [`once`] function. See its
/// documentation for more.
///
/// [`once`]: fn.once.html
#[derive(Debug)]
Expand Down
3 changes: 2 additions & 1 deletion src/stream/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ where

/// A stream that yields the same item repeatedly.
///
/// This stream is constructed by the [`repeat`] function.
/// This stream is created by the [`repeat`] function. See its
/// documentation for more.
///
/// [`repeat`]: fn.repeat.html
#[derive(Debug)]
Expand Down
3 changes: 2 additions & 1 deletion src/stream/repeat_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use crate::task::{Context, Poll};
pin_project! {
/// A stream that repeats elements of type `T` endlessly by applying a provided closure.
///
/// This stream is constructed by the [`repeat_with`] function.
/// This stream is created by the [`repeat_with`] function. See its
/// documentation for more.
///
/// [`repeat_with`]: fn.repeat_with.html
#[derive(Debug)]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// Chains two streams one after another.
///
/// This `struct` is created by the [`chain`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`chain`]: trait.Stream.html#method.chain
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct Chain<S, U> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream to filter elements of another stream with a predicate.
///
/// This `struct` is created by the [`filter`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`filter`]: trait.Stream.html#method.filter
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct Filter<S, P, T> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! {
/// A `Stream` that is permanently closed once a single call to `poll` results in
/// `Poll::Ready(None)`, returning `Poll::Ready(None)` for all future calls to `poll`.
///
/// This `struct` is created by the [`fuse`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`fuse`]: trait.Stream.html#method.fuse
/// [`Stream`]: trait.Stream.html
#[derive(Clone, Debug)]
pub struct Fuse<S> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream that does something with each element of another stream.
///
/// This `struct` is created by the [`inspect`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`inspect`]: trait.Stream.html#method.inspect
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct Inspect<S, F, T> {
#[pin]
Expand Down
6 changes: 4 additions & 2 deletions src/stream/stream/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ use pin_project_lite::pin_project;
pin_project! {
/// A stream that merges two other streams into a single stream.
///
/// This stream is returned by [`Stream::merge`].
/// This `struct` is created by the [`merge`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`Stream::merge`]: trait.Stream.html#method.merge
/// [`merge`]: trait.Stream.html#method.merge
/// [`Stream`]: trait.Stream.html
#[cfg(feature = "unstable")]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[derive(Debug)]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream to maintain state while polling another stream.
///
/// This `struct` is created by the [`scan`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`scan`]: trait.Stream.html#method.scan
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct Scan<S, St, F> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ use crate::stream::Stream;

pin_project! {
/// A stream to skip first n elements of another stream.
///
/// This `struct` is created by the [`skip`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`skip`]: trait.Stream.html#method.skip
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct Skip<S> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/skip_while.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream to skip elements of another stream based on a predicate.
///
/// This `struct` is created by the [`skip_while`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`skip_while`]: trait.Stream.html#method.skip_while
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct SkipWhile<S, P, T> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/step_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream that steps a given amount of elements of another stream.
///
/// This `struct` is created by the [`step_by`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`step_by`]: trait.Stream.html#method.step_by
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct StepBy<S> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream that yields the first `n` items of another stream.
///
/// This `struct` is created by the [`take`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`take`]: trait.Stream.html#method.take
/// [`Stream`]: trait.Stream.html
#[derive(Clone, Debug)]
pub struct Take<S> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/take_while.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// A stream that yields elements based on a predicate.
///
/// This `struct` is created by the [`take_while`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`take_while`]: trait.Stream.html#method.take_while
/// [`Stream`]: trait.Stream.html
#[derive(Debug)]
pub struct TakeWhile<S, P, T> {
#[pin]
Expand Down
6 changes: 6 additions & 0 deletions src/stream/stream/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ use crate::task::{Context, Poll};

pin_project! {
/// An iterator that iterates two other iterators simultaneously.
///
/// This `struct` is created by the [`zip`] method on [`Stream`]. See its
/// documentation for more.
///
/// [`zip`]: trait.Stream.html#method.zip
/// [`Stream`]: trait.Stream.html
pub struct Zip<A: Stream, B> {
item_slot: Option<A::Item>,
#[pin]
Expand Down