pub trait RouterExt<B>: Sealed {
    fn typed_get<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_delete<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_head<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_options<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_patch<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_post<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_put<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; fn typed_trace<H, T, P>(self, handler: H) -> Self
    where
        H: Handler<T, B>,
        T: FirstElementIs<P> + 'static,
        P: TypedPath
; }
Expand description

Extension trait that adds additional methods to Router.

Required Methods

Add a typed GET route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Add a typed DELETE route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Add a typed HEAD route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Add a typed OPTIONS route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Add a typed PATCH route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

fn typed_post<H, T, P>(self, handler: H) -> Self where
    H: Handler<T, B>,
    T: FirstElementIs<P> + 'static,
    P: TypedPath

Add a typed POST route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Add a typed PUT route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Add a typed TRACE route to the router.

The path will be inferred from the first argument to the handler function which must implement TypedPath.

See TypedPath for more details and examples.

Implementations on Foreign Types

source

fn typed_post<H, T, P>(self, handler: H) -> Self where
    H: Handler<T, B>,
    T: FirstElementIs<P> + 'static,
    P: TypedPath

Implementors