pub struct HttpServer { /* private fields */ }
Implementations§
Source§impl HttpServer
impl HttpServer
Sourcepub fn new(bind_addr: &str) -> HttpServer
pub fn new(bind_addr: &str) -> HttpServer
Begins listening for http requests on the bind_addr
§Arguments
bind_addr
- String in expected format of ip:port
pub fn add_route( &mut self, method: HttpRequestMethod, path: &str, handler: fn(&mut HttpRequest), )
pub fn set_pool_size(self, pool_size: usize) -> HttpServer
Auto Trait Implementations§
impl Freeze for HttpServer
impl RefUnwindSafe for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl UnwindSafe for HttpServer
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