[−][src]Struct express_rs::Express
Implementations
impl Express
[src]
Main application object
Provides ways to mount path and method combinations and assign functions to them.
pub fn new() -> Self
[src]
pub fn get<F: 'static>(&mut self, path: &str, callback: F) -> &mut Self where
F: FnMut(&Request, &mut Response),
Self: Sized,
[src]
F: FnMut(&Request, &mut Response),
Self: Sized,
pub fn post<F: 'static>(&mut self, path: &str, callback: F) -> &mut Self where
F: FnMut(&Request, &mut Response),
Self: Sized,
[src]
F: FnMut(&Request, &mut Response),
Self: Sized,
pub fn put<F: 'static>(&mut self, path: &str, callback: F) -> &mut Self where
F: FnMut(&Request, &mut Response),
Self: Sized,
[src]
F: FnMut(&Request, &mut Response),
Self: Sized,
pub fn delete<F: 'static>(&mut self, path: &str, callback: F) -> &mut Self where
F: FnMut(&Request, &mut Response),
Self: Sized,
[src]
F: FnMut(&Request, &mut Response),
Self: Sized,
pub fn patch<F: 'static>(&mut self, path: &str, callback: F) -> &mut Self where
F: FnMut(&Request, &mut Response),
Self: Sized,
[src]
F: FnMut(&Request, &mut Response),
Self: Sized,
pub fn listen(&mut self, port: u16)
[src]
Port numbers can range from 1-65535, therefore a u16 is used here
Panics
Panics, if:
- a port is not between 1-65535 or
- address on host is already in use
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Express
impl !Send for Express
impl !Sync for Express
impl Unpin for Express
impl !UnwindSafe for Express
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>,