#[cfg(feature = "actix")]
pub mod actix;
#[cfg(feature = "axum")]
pub mod axum;
pub trait RegisterRoute<B, T> {
#[must_use]
fn register(self, backend: B) -> Self;
}
#[derive(Clone, Debug)]
pub struct ApiBuilder<R> {
router: R,
#[allow(unused)]
root: bool,
}
impl<R> ApiBuilder<R> {
pub fn new(router: R) -> Self {
Self { router, root: true }
}
pub fn new_with_router(router: R, register_root: bool) -> Self {
Self {
router,
root: register_root,
}
}
pub fn build(self) -> R {
self.router
}
}