Struct ho::router::RouteHandler [−][src]
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]
&mut self,
method: Method,
route: &str,
function: fn(_: Request, _: Args) -> Response
)
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]
&self,
method: Method,
route: &str
) -> (Option<fn(_: Request, _: Args) -> Response>, Args)
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]
&self,
method: Method,
route: &str,
args: Args
) -> (Option<fn(_: Request, _: Args) -> Response>, Args)
Returns a function if present for the given route and method and uses an existing argument list.
Auto Trait Implementations
impl RefUnwindSafe for RouteHandler
impl Send for RouteHandler
impl Sync for RouteHandler
impl Unpin for RouteHandler
impl UnwindSafe for RouteHandler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,