Skip to content

Commit

Permalink
docs(server): suggest hyper-util autoconnection util
Browse files Browse the repository at this point in the history
  • Loading branch information
oddgrd authored and seanmonstar committed Sep 28, 2023
1 parent 6951466 commit c28473d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/server/conn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
//! are not handled at this level. This module provides the building blocks to
//! customize those things externally.
//!
//! This module is split by HTTP version. Both work similarly, but do have
//! specific options on each builder.
//! This module is split by HTTP version, providing a connection builder for
//! each. They work similarly, but they each have specific options.
//!
//! If your server needs to support both versions, an auto connection builder is
//! provided in the [`hyper-util`](https://github.com/hyperium/hyper-util/tree/master)
//! crate. This builder wraps the HTTP/1 and HTTP/2 connection builders from this
//! module, allowing you to set configuration for both. The builder will then check
//! the version of the incoming connection and serve it accordingly.
#[cfg(feature = "http1")]
pub mod http1;
Expand Down
2 changes: 1 addition & 1 deletion src/service/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ pub trait Service<Request> {
/// - It's clearer that Services can likely be cloned
/// - To share state across clones you generally need Arc<Mutex<_>>
/// that means you're not really using the &mut self and could do with a &self
/// To see the discussion on this see: https://github.com/hyperium/hyper/issues/3040
/// To see the discussion on this see: <https://github.com/hyperium/hyper/issues/3040>
fn call(&self, req: Request) -> Self::Future;
}

0 comments on commit c28473d

Please sign in to comment.