Fix links to 'Stream!' in 'ws' rustdocs.

This commit is contained in:
Sergio Benitez 2023-04-05 09:58:21 -07:00
parent 03433c10ea
commit 07ea3df0c2
1 changed files with 9 additions and 6 deletions

View File

@ -21,10 +21,11 @@ use crate::result::{Result, Error};
/// This is the entrypoint to the library. Every WebSocket response _must_ /// This is the entrypoint to the library. Every WebSocket response _must_
/// initiate via the `WebSocket` request guard. The guard identifies valid /// initiate via the `WebSocket` request guard. The guard identifies valid
/// WebSocket connection requests and, if the request is valid, succeeds to be /// WebSocket connection requests and, if the request is valid, succeeds to be
/// converted into a streaming WebSocket response via [`Stream!`], /// converted into a streaming WebSocket response via
/// [`WebSocket::channel()`], or [`WebSocket::stream()`]. The connection can be /// [`Stream!`](crate::Stream!), [`WebSocket::channel()`], or
/// configured via [`WebSocket::config()`]; see [`Config`] for details on /// [`WebSocket::stream()`]. The connection can be configured via
/// configuring a connection. /// [`WebSocket::config()`]; see [`Config`] for details on configuring a
/// connection.
/// ///
/// ### Forwarding /// ### Forwarding
/// ///
@ -123,8 +124,8 @@ impl WebSocket {
/// ///
/// This method takes a `FnOnce` `stream` that consumes a read-only stream /// This method takes a `FnOnce` `stream` that consumes a read-only stream
/// and returns a stream of [`Message`]s. While the returned stream can be /// and returns a stream of [`Message`]s. While the returned stream can be
/// constructed in any manner, the [`Stream!`] macro is the preferred /// constructed in any manner, the [`Stream!`](crate::Stream!) macro is the
/// method. In any case, the stream must be `Send`. /// preferred method. In any case, the stream must be `Send`.
/// ///
/// The returned stream must emit items of type `Result<Message>`. Items /// The returned stream must emit items of type `Result<Message>`. Items
/// that are `Ok(Message)` are sent to the client while items of type /// that are `Ok(Message)` are sent to the client while items of type
@ -175,6 +176,8 @@ pub struct Channel<'r> {
/// This type should not be used directly. Instead, it is used via the /// This type should not be used directly. Instead, it is used via the
/// [`Stream!`] macro, which expands to both the type itself and an expression /// [`Stream!`] macro, which expands to both the type itself and an expression
/// which evaluates to this type. See [`Stream!`] for details. /// which evaluates to this type. See [`Stream!`] for details.
///
/// [`Stream!`]: crate::Stream!
// TODO: Get rid of this or `Channel` via a single `enum`. // TODO: Get rid of this or `Channel` via a single `enum`.
pub struct MessageStream<'r, S> { pub struct MessageStream<'r, S> {
ws: WebSocket, ws: WebSocket,