Struct thruster::Server [−][src]
pub struct Server<T: 'static + Context<Response = Response> + Clone + Send + Sync, S: 'static + Send> { /* fields omitted */ }
Implementations
impl<T: 'static + Context<Response = Response> + Clone + Send + Sync, S: 'static + Send + Sync> Server<T, S>
[src]
impl<T: 'static + Context<Response = Response> + Clone + Send + Sync, S: 'static + Send + Sync> Server<T, S>
[src]pub fn start_work_stealing_optimized(self, host: &str, port: u16)
[src]
pub fn start_work_stealing_optimized(self, host: &str, port: u16)
[src]Starts the app with the default tokio runtime execution model
pub fn start_small_load_optimized(self, host: &str, port: u16)
[src]
pub fn start_small_load_optimized(self, host: &str, port: u16)
[src]Starts the app with a thread pool optimized for small requests and quick timeouts. This is done internally by spawning a separate thread for each reactor core. This is valuable if all server endpoints are similar in their load, as work is divided evenly among threads. As seanmonstar points out though, this is a very specific use case and might not be useful for everyday work loads.alloc
See the discussion here for more information:
https://users.rust-lang.org/t/getting-tokio-to-match-actix-web-performance/18659/7
Trait Implementations
impl<T: Context<Response = Response> + Clone + Send + Sync, S: 'static + Send + Sync> ThrusterServer for Server<T, S>
[src]
impl<T: Context<Response = Response> + Clone + Send + Sync, S: 'static + Send + Sync> ThrusterServer for Server<T, S>
[src]type Context = T
type Response = Response
type Request = Request
type State = S
fn new(app: App<Self::Request, T, S>) -> Self
[src]
fn build<'life0, 'async_trait>(
self,
host: &'life0 str,
port: u16
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
self,
host: &'life0 str,
port: u16
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn start(self, host: &str, port: u16) where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl<T, S> !RefUnwindSafe for Server<T, S>
impl<T, S> Send for Server<T, S> where
S: Sync,
S: Sync,
impl<T, S> Sync for Server<T, S> where
S: Sync,
S: Sync,