backlink all docs

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
pull/394/head
Yoshua Wuyts 5 years ago
parent 81e3cab00d
commit a3a740c14a
No known key found for this signature in database
GPG Key ID: 24EA8164F96777ED

@ -6,6 +6,11 @@ use crate::task::{Context, Poll};
/// Creates a stream that doesn't yield any items. /// 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 /// # Examples
/// ///
/// ``` /// ```

@ -10,7 +10,8 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream that yields elements by calling a closure. /// 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 /// [`from_fn`]: fn.from_fn.html
#[derive(Debug)] #[derive(Debug)]

@ -52,6 +52,10 @@ pub fn interval(dur: Duration) -> Interval {
/// A stream representing notifications at fixed 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(feature = "unstable")]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[derive(Debug)] #[derive(Debug)]

@ -29,7 +29,8 @@ pub fn once<T>(t: T) -> Once<T> {
pin_project! { pin_project! {
/// A stream that yields a single item. /// 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 /// [`once`]: fn.once.html
#[derive(Debug)] #[derive(Debug)]

@ -29,9 +29,10 @@ where
/// A stream that yields the same item repeatedly. /// 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 /// [`repeat`]: fn.once.html
#[derive(Debug)] #[derive(Debug)]
pub struct Repeat<T> { pub struct Repeat<T> {
item: T, item: T,

@ -10,7 +10,8 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream that repeats elements of type `T` endlessly by applying a provided closure. /// 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 /// [`repeat_with`]: fn.repeat_with.html
#[derive(Debug)] #[derive(Debug)]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// Chains two streams one after another. /// 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)] #[derive(Debug)]
pub struct Chain<S, U> { pub struct Chain<S, U> {
#[pin] #[pin]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream to filter elements of another stream with a predicate. /// 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)] #[derive(Debug)]
pub struct Filter<S, P, T> { pub struct Filter<S, P, T> {
#[pin] #[pin]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A `Stream` that is permanently closed once a single call to `poll` results in /// 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`. /// `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)] #[derive(Clone, Debug)]
pub struct Fuse<S> { pub struct Fuse<S> {
#[pin] #[pin]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream that does something with each element of another stream. /// 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)] #[derive(Debug)]
pub struct Inspect<S, F, T> { pub struct Inspect<S, F, T> {
#[pin] #[pin]

@ -7,9 +7,11 @@ use pin_project_lite::pin_project;
pin_project! { pin_project! {
/// A stream that merges two other streams into a single stream. /// 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(feature = "unstable")]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[derive(Debug)] #[derive(Debug)]

@ -7,6 +7,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream to maintain state while polling another stream. /// 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)] #[derive(Debug)]
pub struct Scan<S, St, F> { pub struct Scan<S, St, F> {
#[pin] #[pin]

@ -7,6 +7,12 @@ use crate::stream::Stream;
pin_project! { pin_project! {
/// A stream to skip first n elements of another stream. /// 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)] #[derive(Debug)]
pub struct Skip<S> { pub struct Skip<S> {
#[pin] #[pin]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream to skip elements of another stream based on a predicate. /// 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)] #[derive(Debug)]
pub struct SkipWhile<S, P, T> { pub struct SkipWhile<S, P, T> {
#[pin] #[pin]

@ -7,6 +7,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream that steps a given amount of elements of another stream. /// 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)] #[derive(Debug)]
pub struct StepBy<S> { pub struct StepBy<S> {
#[pin] #[pin]

@ -7,6 +7,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream that yields the first `n` items of another stream. /// 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)] #[derive(Clone, Debug)]
pub struct Take<S> { pub struct Take<S> {
#[pin] #[pin]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// A stream that yields elements based on a predicate. /// 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)] #[derive(Debug)]
pub struct TakeWhile<S, P, T> { pub struct TakeWhile<S, P, T> {
#[pin] #[pin]

@ -8,6 +8,12 @@ use crate::task::{Context, Poll};
pin_project! { pin_project! {
/// An iterator that iterates two other iterators simultaneously. /// 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> { pub struct Zip<A: Stream, B> {
item_slot: Option<A::Item>, item_slot: Option<A::Item>,
#[pin] #[pin]

Loading…
Cancel
Save