mod anthropic;
pub mod metadata;
mod openai;
pub mod busy_threshold;
pub mod disconnect;
pub mod error;
pub mod frontend_extension;
pub mod generate;
pub mod health;
pub mod metrics;
pub mod openapi_docs;
pub mod realtime;
pub mod service_v2;
pub use axum;
pub use frontend_extension::{
FrontendExtensionContext, FrontendRouteExtension, FrontendRouteSet,
validate_extension_route_path,
};
pub use metrics::Metrics;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct RouteDoc {
method: axum::http::Method,
path: String,
}
impl std::fmt::Display for RouteDoc {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{} {}", self.method, self.path)
}
}
impl RouteDoc {
pub fn new<T: Into<String>>(method: axum::http::Method, path: T) -> Self {
RouteDoc {
method,
path: path.into(),
}
}
pub fn method(&self) -> &axum::http::Method {
&self.method
}
pub fn path(&self) -> &str {
&self.path
}
}