mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
wip
This commit is contained in:
@@ -31,7 +31,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get<H, T>(mut self, path: &str, mut handler: H) -> Self
|
||||
pub fn get<H, T>(mut self, path: &str, handler: H) -> Self
|
||||
where
|
||||
H: OpenApiHandler<T, B>,
|
||||
T: 'static,
|
||||
@@ -43,7 +43,7 @@ where
|
||||
self
|
||||
}
|
||||
|
||||
pub fn post<H, T>(mut self, path: &str, mut handler: H) -> Self
|
||||
pub fn post<H, T>(mut self, path: &str, handler: H) -> Self
|
||||
where
|
||||
H: OpenApiHandler<T, B>,
|
||||
T: 'static,
|
||||
@@ -71,8 +71,6 @@ pub trait OpenApiHandler<T, B>: Handler<T, B> {
|
||||
}
|
||||
}
|
||||
|
||||
pub type SetOperationField<H, T, B> = MapOperation<H, T, B, Box<dyn FnOnce(&mut Operation)>>;
|
||||
|
||||
pub struct MapOperation<H, T, B, F> {
|
||||
handler: H,
|
||||
f: F,
|
||||
|
||||
Reference in New Issue
Block a user