You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Refactor listeners building
This commit is contained in:
@ -22,9 +22,20 @@ use super::otel::TraceLayer;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct ServerLayer<ReqBody> {
|
||||
listener_name: Option<String>,
|
||||
_t: PhantomData<ReqBody>,
|
||||
}
|
||||
|
||||
impl<B> ServerLayer<B> {
|
||||
#[must_use]
|
||||
pub fn new(listener_name: Option<String>) -> Self {
|
||||
Self {
|
||||
listener_name,
|
||||
_t: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<ReqBody, ResBody, S> Layer<S> for ServerLayer<ReqBody>
|
||||
where
|
||||
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
|
||||
|
Reference in New Issue
Block a user