[][src]Struct sapper::Router

pub struct Router { /* fields omitted */ }

Sapper router struct

Methods

impl SapperRouter[src]

pub fn new() -> SapperRouter[src]

pub fn route<H>(
    &mut self,
    method: Method,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter where
    H: SapperHandler + 'static, 
[src]

basic router method

pub fn get<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Get method.

pub fn post<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Post method.

pub fn put<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Put method.

pub fn delete<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Delete method.

pub fn head<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Head method.

pub fn patch<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Patch method.

pub fn options<H: SapperHandler + 'static>(
    &mut self,
    glob: &'static str,
    handler: H
) -> &mut SapperRouter
[src]

Like route, but specialized to the Options method.

pub fn into_router(
    &self
) -> &HashMap<Method, Vec<(&'static str, Arc<Box<dyn SapperHandler>>)>>
[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<T> Typeable for T where
    T: Any

impl<T> UnsafeAny for T where
    T: Any