Struct reset_router::RouterBuilder
source · pub struct RouterBuilder<'a, S> { /* private fields */ }Implementations
sourceimpl<'a> RouterBuilder<'a, ()>
impl<'a> RouterBuilder<'a, ()>
sourceimpl<'a, S: 'static> RouterBuilder<'a, S>
impl<'a, S: 'static> RouterBuilder<'a, S>
pub fn with_state<O>(self, state: O) -> RouterBuilder<'a, O>
pub fn add_not_found<H>(self, handler: H) -> Selfwhere
H: Into<BoxedHandler> + 'static,
pub fn add<H>(self, method: Method, regex: &'a str, handler: H) -> Selfwhere
H: Into<BoxedHandler> + 'static,
pub fn add_routes(self, routes: Vec<(u32, &'a str, u8, BoxedHandler)>) -> Self
pub fn add_with_priority<H>(
self,
method: Method,
regex: &'a str,
priority: u8,
handler: H
) -> Selfwhere
H: Into<BoxedHandler> + 'static,
pub fn finish(self) -> Result<Router<S>>
Auto Trait Implementations
impl<'a, S> !RefUnwindSafe for RouterBuilder<'a, S>
impl<'a, S> Send for RouterBuilder<'a, S>where
S: Send,
impl<'a, S> Sync for RouterBuilder<'a, S>where
S: Sync,
impl<'a, S> Unpin for RouterBuilder<'a, S>where
S: Unpin,
impl<'a, S> !UnwindSafe for RouterBuilder<'a, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more