[−][src]Struct nuclear_router::HttpRouter
Methods
impl<T> HttpRouter<T>
[src]
pub fn new() -> Self
[src]
pub fn find<'p, 's: 'p>(
&'s self,
method: &Method,
path: &'p str
) -> Option<(&'s T, Captures<'p>)>
[src]
&'s self,
method: &Method,
path: &'p str
) -> Option<(&'s T, Captures<'p>)>
pub fn find_mut<'p, 's: 'p>(
&'s mut self,
method: &Method,
path: &'p str
) -> Option<(&'s mut T, Captures<'p>)>
[src]
&'s mut self,
method: &Method,
path: &'p str
) -> Option<(&'s mut T, Captures<'p>)>
pub fn insert(&mut self, method: Method, pattern: &str, data: T) -> &mut Self
[src]
pub fn try_insert(
&mut self,
method: Method,
pattern: &str,
data: T
) -> Result<&mut Self, RouterError>
[src]
&mut self,
method: Method,
pattern: &str,
data: T
) -> Result<&mut Self, RouterError>
pub fn nest(
&mut self,
prefix: &str,
f: impl FnOnce(&mut HttpRouter<T>)
) -> &mut Self
[src]
&mut self,
prefix: &str,
f: impl FnOnce(&mut HttpRouter<T>)
) -> &mut Self
pub fn try_nest(
&mut self,
prefix: &str,
f: impl FnOnce(&mut HttpRouter<T>)
) -> Result<&mut Self, RouterError>
[src]
&mut self,
prefix: &str,
f: impl FnOnce(&mut HttpRouter<T>)
) -> Result<&mut Self, RouterError>
pub fn insert_router(&mut self, prefix: &str, router: HttpRouter<T>)
[src]
pub fn try_insert_router(
&mut self,
prefix: &str,
router: HttpRouter<T>
) -> Result<&mut Self, RouterError>
[src]
&mut self,
prefix: &str,
router: HttpRouter<T>
) -> Result<&mut Self, RouterError>
impl HttpRouter<Box<dyn Handler + Send + Sync>>
[src]
pub fn route(
&mut self,
method: Method,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
method: Method,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn with_default(
self,
default: impl Handler + Send + Sync + 'static
) -> RouterService
[src]
self,
default: impl Handler + Send + Sync + 'static
) -> RouterService
impl HttpRouter<Box<dyn Handler + Send + Sync>>
[src]
pub fn get(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn post(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn put(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn delete(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn head(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn options(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn connect(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn patch(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
pub fn trace(
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
[src]
&mut self,
path: &str,
h: impl Handler + Send + Sync + 'static
) -> &mut Self
Trait Implementations
impl<T: Debug> Debug for HttpRouter<T>
[src]
impl<T: Default> Default for HttpRouter<T>
[src]
fn default() -> HttpRouter<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for HttpRouter<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for HttpRouter<T> where
T: Send,
T: Send,
impl<T> Sync for HttpRouter<T> where
T: Sync,
T: Sync,
impl<T> Unpin for HttpRouter<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for HttpRouter<T> where
T: UnwindSafe,
T: UnwindSafe,
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>,