diff --git a/src/client/conn/http2.rs b/src/client/conn/http2.rs index 4df19a10cc..9e19d26949 100644 --- a/src/client/conn/http2.rs +++ b/src/client/conn/http2.rs @@ -314,6 +314,11 @@ where } } + /// Returns the executor this builder was created with. + pub fn executor(&self) -> &Ex { + &self.exec + } + /// Provide a timer to execute background HTTP2 tasks. pub fn timer(&mut self, timer: M) -> &mut Builder where diff --git a/src/server/conn/http2.rs b/src/server/conn/http2.rs index e4dac78bea..72f28ecbbd 100644 --- a/src/server/conn/http2.rs +++ b/src/server/conn/http2.rs @@ -120,6 +120,11 @@ impl Builder { } } + /// Returns the executor this builder was created with. + pub fn executor(&self) -> &E { + &self.exec + } + /// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent. /// /// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2).