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

Available on crate feature typed-routing only.

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.

Available on crate feature typed-routing only.

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.

Available on crate feature typed-routing only.

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.

Available on crate feature typed-routing only.

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.

Available on crate feature typed-routing only.

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

Available on crate feature typed-routing only.

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.

Available on crate feature typed-routing only.

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.

Available on crate feature typed-routing only.

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

Available on crate feature typed-routing only.
Available on crate feature typed-routing only.
Available on crate feature typed-routing only.
Available on crate feature typed-routing only.
Available on crate feature typed-routing only.
source

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

Available on crate feature typed-routing only.
Available on crate feature typed-routing only.
Available on crate feature typed-routing only.

Implementors