pub struct HttpServer<S = ()> { /* private fields */ }Implementations§
Source§impl<S> HttpServer<S>
impl<S> HttpServer<S>
pub fn new() -> Self
pub fn with_state(self, state: S) -> Self
pub fn delete<F, Fut>(&mut self, path: String, handler: F)
pub fn get<F, Fut>(&mut self, path: String, handler: F)
pub fn patch<F, Fut>(&mut self, path: String, handler: F)
pub fn post<F, Fut>(&mut self, path: String, handler: F)
pub async fn listen(&mut self, port: u16) -> Result<()>
Auto Trait Implementations§
impl<S> Freeze for HttpServer<S>
impl<S = ()> !RefUnwindSafe for HttpServer<S>
impl<S> Send for HttpServer<S>
impl<S> Sync for HttpServer<S>
impl<S> Unpin for HttpServer<S>
impl<S = ()> !UnwindSafe for HttpServer<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more