in_space_core/lib.rs
//pub trait Response {
// fn into_json(self) -> warp::reply::Json;
//}
//
//pub type Result<T: Response, F> = std::result::Result<T, F>;
//
//pub trait Conversions {
// fn into_warp_result(self) -> std::result::Result<warp::reply::Json, std::convert::Infallible>;
//}
//
//impl<T: Response, F> Conversions for Result<T, F> {
// fn into_warp_result(self) -> std::result::Result<warp::reply::Json, std::convert::Infallible> {
// todo!()
// }
//}
pub trait Middleware {
type Output;
}
impl<T, Fil: warp::Filter<Extract = (T,)>, F: Fn() -> Fil> Middleware for F {
type Output = T;
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}