saluki_api/
lib.rs

1pub use axum::response;
2pub use axum::routing;
3use axum::Router;
4pub use http::StatusCode;
5
6pub mod extract {
7    pub use axum::extract::*;
8    pub use axum_extra::extract::Query;
9}
10
11// An API handler.
12//
13// API handlers define the initial state and routes for a portion of an API.
14pub trait APIHandler {
15    type State: Clone + Send + Sync + 'static;
16
17    fn generate_initial_state(&self) -> Self::State;
18    fn generate_routes(&self) -> Router<Self::State>;
19}