Struct ho::router::RouteHandler[][src]

pub struct RouteHandler { /* fields omitted */ }

Implementations

impl RouteHandler[src]

pub fn new() -> RouteHandler[src]

pub fn add_route(
    &mut self,
    method: Method,
    route: &str,
    function: fn(_: Request, _: Args) -> Response
)
[src]

Add a function to be returned on a given path and method.

pub fn get_route(
    &self,
    method: Method,
    route: &str
) -> (Option<fn(_: Request, _: Args) -> Response>, Args)
[src]

Returns a function if present for the given route and method.

pub fn get_route_existing_args(
    &self,
    method: Method,
    route: &str,
    args: Args
) -> (Option<fn(_: Request, _: Args) -> Response>, Args)
[src]

Returns a function if present for the given route and method and uses an existing argument list.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.