mirror of
https://github.com/Noratrieb/icefun.git
synced 2026-01-14 12:55:02 +01:00
loop
This commit is contained in:
parent
370b3bcf98
commit
bb02adf04e
2 changed files with 7 additions and 7 deletions
|
|
@ -16,7 +16,7 @@ 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 {
|
||||
pub trait NewSvcExec<I, S, E, W: Watcher<I, S>>: Clone {
|
||||
fn execute_new_svc(&mut self, fut: NewSvcTask<I, S, E, W>);
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ where
|
|||
impl<I, S, E, W> NewSvcExec<I, S, E, W> for Exec
|
||||
where
|
||||
NewSvcTask<I, S, E, W>: Future<Output = ()> + Send + 'static,
|
||||
W: Watcher<I, S, E>,
|
||||
W: Watcher<I, S>,
|
||||
{
|
||||
fn execute_new_svc(&mut self, fut: NewSvcTask<I, S, E, W>) {
|
||||
loop {}
|
||||
|
|
|
|||
|
|
@ -64,12 +64,12 @@ impl<I, E> Builder<I, E> {
|
|||
loop {}
|
||||
}
|
||||
}
|
||||
pub trait Watcher<I, S, E> {
|
||||
pub trait Watcher<I, S> {
|
||||
type Future;
|
||||
}
|
||||
|
||||
pub(crate) struct NoopWatcher;
|
||||
impl<I, S, E> Watcher<I, S, E> for NoopWatcher
|
||||
impl<I, S> Watcher<I, S> for NoopWatcher
|
||||
where
|
||||
S: HttpService<Body>,
|
||||
{
|
||||
|
|
@ -83,11 +83,11 @@ pub(crate) mod new_svc {
|
|||
use crate::common::{task, Future, Pin, Poll};
|
||||
use crate::service::HttpService;
|
||||
|
||||
pub struct NewSvcTask<I, S, E, W: Watcher<I, S, E>> {
|
||||
pub struct NewSvcTask<I, S, E, W: Watcher<I, S>> {
|
||||
state: State<I, S, E, W>,
|
||||
}
|
||||
|
||||
pub(super) struct State<I, S, E, W: Watcher<I, S, E>> {
|
||||
pub(super) struct State<I, S, E, W: Watcher<I, S>> {
|
||||
a: (I, S, E),
|
||||
future: W::Future,
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ pub(crate) mod new_svc {
|
|||
where
|
||||
S: HttpService<Body, ResBody = B>,
|
||||
E: ConnStreamExec<S::Future, B>,
|
||||
W: Watcher<I, S, E>,
|
||||
W: Watcher<I, S>,
|
||||
{
|
||||
type Output = ();
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue