pub trait TincService {
// Required methods
fn into_router(self) -> Router;
fn openapi_schema_str(&self) -> &'static str;
// Provided method
fn openapi_schema(&self) -> OpenApi { ... }
}
Expand description
TincServices are typically generated by the tinc-build
crate and this trait lets you convert the service
into an axum router.
Required Methods§
Sourcefn into_router(self) -> Router
fn into_router(self) -> Router
Convert the service into an axum router.
Sourcefn openapi_schema_str(&self) -> &'static str
fn openapi_schema_str(&self) -> &'static str
Get the raw openapi spec for this tinc service.
Provided Methods§
Sourcefn openapi_schema(&self) -> OpenApi
fn openapi_schema(&self) -> OpenApi
Get the openapi spec for this service.