All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rust-axum.server-route.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
/// Setup API Server.
pub fn new(api_impl: I) -> Router
where
    I: AsRef + Clone + Send + Sync + 'static,
    A: Api + 'static,
{
    // build our application with a route
    Router::new()
        {{#pathMethodOps}}
        .route("{{{basePathWithoutHost}}}{{{path}}}",
            {{#methodOperations}}{{{method}}}({{{operationID}}}::){{^-last}}.{{/-last}}{{/methodOperations}}
        )
        {{/pathMethodOps}}
        .with_state(api_impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy