[go: nahoru, domu]

Skip to content

Commit

Permalink
docs: mention that most futures from Server run on current runtime (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
emesterhazy authored Jun 19, 2021
1 parent 676d83f commit b21ce92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/filters/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ pub fn tail() -> impl Filter<Extract = One<Tail>, Error = Infallible> + Copy {
})
}

/// Represents that tail part of a request path, returned by the `tail()` filter.
/// Represents the tail part of a request path, returned by the [`tail()`] filter.
pub struct Tail {
path: PathAndQuery,
start_index: usize,
Expand Down Expand Up @@ -357,7 +357,7 @@ pub fn peek() -> impl Filter<Extract = One<Peek>, Error = Infallible> + Copy {
})
}

/// Represents that tail part of a request path, returned by the `tail()` filter.
/// Represents the tail part of a request path, returned by the [`peek()`] filter.
pub struct Peek {
path: PathAndQuery,
start_index: usize,
Expand Down Expand Up @@ -416,7 +416,7 @@ pub fn full() -> impl Filter<Extract = One<FullPath>, Error = Infallible> + Copy
filter_fn(move |route| future::ok(one(FullPath(path_and_query(&route)))))
}

/// Represents the full request path, returned by the `full()` filter.
/// Represents the full request path, returned by the [`full()`] filter.
pub struct FullPath(PathAndQuery);

impl FullPath {
Expand Down
14 changes: 7 additions & 7 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ where
}

/// Bind to a socket address, returning a `Future` that can be
/// executed on any runtime.
/// executed on the current runtime.
///
/// # Panics
///
Expand Down Expand Up @@ -201,7 +201,7 @@ where
/// Bind to a possibly ephemeral socket address.
///
/// Returns the bound address and a `Future` that can be executed on
/// any runtime.
/// the current runtime.
///
/// # Panics
///
Expand All @@ -226,7 +226,7 @@ where
/// underlying error.
///
/// Returns the bound address and a `Future` that can be executed on
/// any runtime.
/// the current runtime.
pub fn try_bind_ephemeral(
self,
addr: impl Into<SocketAddr>,
Expand All @@ -248,7 +248,7 @@ where
/// process.
///
/// Returns the bound address and a `Future` that can be executed on
/// any runtime.
/// the current runtime.
///
/// # Example
///
Expand Down Expand Up @@ -313,7 +313,7 @@ where
///
/// This can be used for Unix Domain Sockets, or TLS, etc.
///
/// Returns a `Future` that can be executed on any runtime.
/// Returns a `Future` that can be executed on the current runtime.
pub fn serve_incoming<I>(self, incoming: I) -> impl Future<Output = ()>
where
I: TryStream + Send,
Expand All @@ -333,7 +333,7 @@ where
/// When the signal completes, the server will start the graceful shutdown
/// process.
///
/// Returns a `Future` that can be executed on any runtime.
/// Returns a `Future` that can be executed on the current runtime.
pub fn serve_incoming_with_graceful_shutdown<I>(
self,
incoming: I,
Expand Down Expand Up @@ -524,7 +524,7 @@ where
/// Bind to a possibly ephemeral socket address.
///
/// Returns the bound address and a `Future` that can be executed on
/// any runtime.
/// the current runtime.
///
/// *This function requires the `"tls"` feature.*
pub fn bind_ephemeral(
Expand Down

0 comments on commit b21ce92

Please sign in to comment.