[−][src]Struct reset_router::RouterBuilder
Builder for a Router
Methods
impl RouterBuilder
[src]
pub fn data<T: Send + Sync + 'static>(self, data: T) -> Self
[src]
Add application data
to router
pub fn wrapped_data<T: Send + Sync + 'static>(self, data: Data<T>) -> Self
[src]
Add application data
to router from an existing Data<T>
object
pub fn add_not_found<H>(self, handler: H) -> Self where
H: Into<BoxedServiceFn> + 'static,
[src]
H: Into<BoxedServiceFn> + 'static,
Set the 404: Not Found
handler
pub fn add<H>(self, method: Method, regex: &str, handler: H) -> Self where
H: Into<BoxedServiceFn> + 'static,
[src]
H: Into<BoxedServiceFn> + 'static,
Add handler for method and regex. Highest priority wins. Priority is 0 by default.
pub fn add_with_priority<H>(
self,
method: Method,
regex: &str,
priority: i8,
handler: H
) -> Self where
H: Into<BoxedServiceFn> + 'static,
[src]
self,
method: Method,
regex: &str,
priority: i8,
handler: H
) -> Self where
H: Into<BoxedServiceFn> + 'static,
Add handler for method, regex, and priority. Highest priority wins.
pub fn finish(self) -> Result<Router>
[src]
Consumes the builder, returning the finished Router
Auto Trait Implementations
impl !RefUnwindSafe for RouterBuilder
impl Send for RouterBuilder
impl Sync for RouterBuilder
impl Unpin for RouterBuilder
impl !UnwindSafe for RouterBuilder
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,
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.
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>,