mirror of
https://github.com/Noratrieb/icefun.git
synced 2026-01-14 21:05:00 +01:00
loop
This commit is contained in:
parent
b40c185fc9
commit
44a0230869
2 changed files with 3 additions and 33 deletions
|
|
@ -21,6 +21,7 @@ pub trait ConnStreamExec<F, B: HttpBody>: Clone {
|
|||
pub trait NewSvcExec<I, S, E, W: Watcher<I, S, E>>: Clone {
|
||||
fn execute_new_svc(&mut self, fut: NewSvcTask<I, S, E, W>);
|
||||
}
|
||||
|
||||
pub(crate) type BoxSendFuture = Pin<Box<dyn Future<Output = ()> + Send>>;
|
||||
#[derive(Clone)]
|
||||
pub enum Exec {
|
||||
|
|
@ -42,6 +43,7 @@ where
|
|||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
|
||||
impl<I, S, E, W> NewSvcExec<I, S, E, W> for Exec
|
||||
where
|
||||
|
|
@ -53,7 +55,7 @@ where
|
|||
loop {}
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "server")]
|
||||
|
||||
impl<E, F, B> ConnStreamExec<F, B> for E
|
||||
where
|
||||
E: Executor<H2Stream<F, B>> + Clone,
|
||||
|
|
@ -64,34 +66,3 @@ where
|
|||
loop {}
|
||||
}
|
||||
}
|
||||
#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
|
||||
impl<I, S, E, W> NewSvcExec<I, S, E, W> for E
|
||||
where
|
||||
E: Executor<NewSvcTask<I, S, E, W>> + Clone,
|
||||
NewSvcTask<I, S, E, W>: Future<Output = ()>,
|
||||
S: HttpService<Body>,
|
||||
W: Watcher<I, S, E>,
|
||||
{
|
||||
fn execute_new_svc(&mut self, fut: NewSvcTask<I, S, E, W>) {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
#[cfg(not(feature = "http2"))]
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub(crate) struct H2Stream<F, B>(std::marker::PhantomData<(F, B)>);
|
||||
#[cfg(not(feature = "http2"))]
|
||||
impl<F, B, E> Future for H2Stream<F, B>
|
||||
where
|
||||
F: Future<Output = Result<http::Response<B>, E>>,
|
||||
B: crate::body::HttpBody,
|
||||
B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
|
||||
E: Into<Box<dyn std::error::Error + Send + Sync>>,
|
||||
{
|
||||
type Output = ();
|
||||
fn poll(
|
||||
self: Pin<&mut Self>,
|
||||
_cx: &mut std::task::Context<'_>,
|
||||
) -> std::task::Poll<Self::Output> {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ pub(crate) mod new_svc {
|
|||
}
|
||||
impl<I, S, B, E, W> Future for NewSvcTask<I, S, E, W>
|
||||
where
|
||||
I: AsyncRead + AsyncWrite + Unpin + Send + 'static,
|
||||
S: HttpService<Body, ResBody = B>,
|
||||
B: HttpBody + 'static,
|
||||
B::Error: Into<Box<dyn StdError + Send + Sync>>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue