Skip to main content

AddRoute

Trait AddRoute 

Source
pub trait AddRoute<S> {
    // Required method
    fn add(self, r: (&str, MethodRouter<S, Infallible>)) -> Self;
}
Expand description

Add add method to Router to add routes also to the openapi spec.

Required Methods§

Source

fn add(self, r: (&str, MethodRouter<S, Infallible>)) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S: Clone + Send + Sync + 'static> AddRoute<S> for Router<S>

Source§

fn add(self, r: (&str, MethodRouter<S, Infallible>)) -> Self

Implementors§