Trait TincService

Source
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§

Source

fn into_router(self) -> Router

Convert the service into an axum router.

Source

fn openapi_schema_str(&self) -> &'static str

Get the raw openapi spec for this tinc service.

Provided Methods§

Source

fn openapi_schema(&self) -> OpenApi

Get the openapi spec for this service.

Implementors§