This commit is contained in:
nora 2023-03-07 16:49:21 +01:00
parent 44a0230869
commit dd3b3980bf
2 changed files with 9 additions and 20 deletions

View file

@ -8,14 +8,13 @@ use crate::rt::Executor;
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
use crate::server::server::{new_svc::NewSvcTask, Watcher};
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
use crate::service::HttpService;
use std::fmt;
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
#[cfg(feature = "server")]
pub trait ConnStreamExec<F, B: HttpBody>: Clone {
fn execute_h2stream(&mut self, fut: H2Stream<F, B>);
pub trait ConnStreamExec<F, B>: Clone {
fn execute_h2stream(&mut self);
}
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
pub trait NewSvcExec<I, S, E, W: Watcher<I, S, E>>: Clone {
@ -39,7 +38,7 @@ where
H2Stream<F, B>: Future<Output = ()> + Send + 'static,
B: HttpBody,
{
fn execute_h2stream(&mut self, fut: H2Stream<F, B>) {
fn execute_h2stream(&mut self) {
loop {}
}
}
@ -48,7 +47,6 @@ where
impl<I, S, E, W> NewSvcExec<I, S, E, W> for Exec
where
NewSvcTask<I, S, E, W>: Future<Output = ()> + Send + 'static,
S: HttpService<Body>,
W: Watcher<I, S, E>,
{
fn execute_new_svc(&mut self, fut: NewSvcTask<I, S, E, W>) {
@ -62,7 +60,7 @@ where
H2Stream<F, B>: Future<Output = ()>,
B: HttpBody,
{
fn execute_h2stream(&mut self, fut: H2Stream<F, B>) {
fn execute_h2stream(&mut self) {
loop {}
}
}