Trait hyper::server::server::Watcher

source ·
pub trait Watcher<I, S: HttpService<Body>, E>: Clone {
    type Future: Future<Output = Result<()>>;

    // Required method
    fn watch(&self, conn: UpgradeableConnection<I, S, E>) -> Self::Future;
}

Required Associated Types§

source

type Future: Future<Output = Result<()>>

Required Methods§

source

fn watch(&self, conn: UpgradeableConnection<I, S, E>) -> Self::Future

Implementors§

source§

impl<I, S, E> Watcher<I, S, E> for GracefulWatcherwhere I: AsyncRead + AsyncWrite + Unpin + Send + 'static, S: HttpService<Body>, E: ConnStreamExec<S::Future, S::ResBody>, S::ResBody: 'static, <S::ResBody as HttpBody>::Error: Into<Box<dyn StdError + Send + Sync>>,

§

type Future = Watching<UpgradeableConnection<I, S, E>, fn(_: Pin<&mut UpgradeableConnection<I, S, E>>)>

source§

impl<I, S, E> Watcher<I, S, E> for NoopWatcherwhere I: AsyncRead + AsyncWrite + Unpin + Send + 'static, S: HttpService<Body>, E: ConnStreamExec<S::Future, S::ResBody>, S::ResBody: 'static, <S::ResBody as HttpBody>::Error: Into<Box<dyn StdError + Send + Sync>>,