pub trait Service<ServerStream: Stream<Item = Event>> {
type AppStream: Stream<Item = Event>;
type Error: Error;
type Future: Future<Output = Result<Self::AppStream, Self::Error>>;
// Required method
fn call(
&mut self,
scope: Scope,
server_events: ServerStream,
) -> Self::Future;
}
Expand description
Trait, representing a Service, that is used to handle connections.
It can handle multiple connections at simultaneously.
ASGI equivalent: Application