feat(client): expose connect types without proto feature (#2377)

Make it possible to refer to Connected, Connection, HttpConnector, etc.
without enabling either of the http1/http2 features. This makes feature
selection work better for downstream libraries like hyper-openssl, which
don't want to commit to any particular protocol.

Fix #2376.
This commit is contained in:
Nikhil Benesch
2020-12-28 18:50:28 -05:00
committed by GitHub
parent 3d6bdbe850
commit 73a59e5fc7
7 changed files with 1270 additions and 1241 deletions

View File

@@ -91,6 +91,7 @@ where
self.read_buf_strategy = ReadStrategy::Exact(sz);
}
#[cfg(feature = "server")]
pub fn set_write_strategy_flatten(&mut self) {
// this should always be called only at construction time,
// so this assert is here to catch myself
@@ -475,6 +476,7 @@ impl<B> WriteBuf<B>
where
B: Buf,
{
#[cfg(feature = "server")]
fn set_strategy(&mut self, strategy: WriteStrategy) {
self.strategy = strategy;
}