Struct RouterBuilder

Source
pub struct RouterBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> RouterBuilder<'a>

Source

pub fn add_not_found<B>(self, handler: B) -> Self
where B: InnerHandler + 'static,

Source§

impl<'a> RouterBuilder<'a>

Source

pub fn add_get<B>(self, re: &'a str, handler: B) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_post<B>(self, re: &'a str, handler: B) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_put<B>(self, re: &'a str, handler: B) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_patch<B>(self, re: &'a str, handler: B) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_delete<B>(self, re: &'a str, handler: B) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_head<B>(self, re: &'a str, handler: B) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_get_with_priority<B>( self, re: &'a str, priority: usize, handler: B, ) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_post_with_priority<B>( self, re: &'a str, priority: usize, handler: B, ) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_put_with_priority<B>( self, re: &'a str, priority: usize, handler: B, ) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_patch_with_priority<B>( self, re: &'a str, priority: usize, handler: B, ) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_delete_with_priority<B>( self, re: &'a str, priority: usize, handler: B, ) -> Self
where B: InnerHandler + 'static,

Source

pub fn add_head_with_priority<B>( self, re: &'a str, priority: usize, handler: B, ) -> Self
where B: InnerHandler + 'static,

Source

pub fn finish(self) -> Result<Router>

Trait Implementations§

Source§

impl<'a> Default for RouterBuilder<'a>

Source§

fn default() -> RouterBuilder<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for RouterBuilder<'a>

§

impl<'a> !RefUnwindSafe for RouterBuilder<'a>

§

impl<'a> Send for RouterBuilder<'a>

§

impl<'a> Sync for RouterBuilder<'a>

§

impl<'a> Unpin for RouterBuilder<'a>

§

impl<'a> !UnwindSafe for RouterBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Typeable for T
where T: Any,

Source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.