Trait Application

Source
pub trait Application {
    type Router: RouterExt<State = Self::State>;
    type State;

    // Provided methods
    fn register_extension(
        _: &State<Self::State>,
        router: AxumRouter<Self::State>,
    ) -> AxumRouter<Self::State> { ... }
    fn register_layer(
        _: &State<Self::State>,
        router: AxumRouter<Self::State>,
    ) -> AxumRouter<Self::State> { ... }
    fn register_middleware(
        _: &State<Self::State>,
        router: AxumRouter<Self::State>,
    ) -> AxumRouter<Self::State> { ... }
    fn register_service(server: Server<Self::State>) -> Server<Self::State> { ... }
}
Expand description

Interface d’application web.

Required Associated Types§

Source

type Router: RouterExt<State = Self::State>

Routeur de l’application.

Source

type State

État utilisateur de l’application.

Provided Methods§

Source

fn register_extension( _: &State<Self::State>, router: AxumRouter<Self::State>, ) -> AxumRouter<Self::State>

Source

fn register_layer( _: &State<Self::State>, router: AxumRouter<Self::State>, ) -> AxumRouter<Self::State>

Source

fn register_middleware( _: &State<Self::State>, router: AxumRouter<Self::State>, ) -> AxumRouter<Self::State>

Source

fn register_service(server: Server<Self::State>) -> Server<Self::State>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§