Struct rusty_express::HttpServer
[−]
[src]
pub struct HttpServer { /* fields omitted */ }
Methods
impl HttpServer
[src]
pub fn new() -> Self
[src]
pub fn new_with_config(config: ServerConfig) -> Self
[src]
pub fn listen(&mut self, port: u16)
[src]
pub fn listen_and_manage<T: Send + Sync + Clone + StatesProvider + 'static>(
&mut self,
port: u16,
state: Arc<RwLock<T>>
)
[src]
&mut self,
port: u16,
state: Arc<RwLock<T>>
)
Deprecated since 0.3.0
: This feature will be removed in 0.3.3
pub fn try_to_terminate(&mut self)
[src]
pub fn drop_session_auto_clean(&mut self)
[src]
Trait Implementations
impl ServerDef for HttpServer
[src]
fn def_router(&mut self, router: Route)
[src]
fn set_pool_size(&mut self, size: usize)
[src]
fn set_read_timeout(&mut self, timeout: u16)
[src]
fn set_write_timeout(&mut self, timeout: u16)
[src]
fn def_default_response_header(&mut self, header: HashMap<String, String>)
[src]
fn set_default_response_header(&mut self, field: String, value: String)
[src]
fn enable_session_auto_clean(&mut self, auto_clean_period: Duration)
[src]
fn disable_session_auto_clean(&mut self)
[src]
impl Router for HttpServer
[src]
fn get(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
[src]
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
fn post(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
[src]
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
fn put(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
[src]
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
fn delete(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
[src]
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
fn options(
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
[src]
&mut self,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
fn other(
&mut self,
method: &str,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)
[src]
&mut self,
method: &str,
uri: RequestPath,
callback: fn(_: &Box<Request>, _: &mut Box<Response>)
)