pub trait ThrusterServer {
    type Context: Context + Clone + Send + Sync;
    type Response;
    type Request: ThrusterRequest;
    type State: Send;

    // Required methods
    fn new(_: App<Self::Request, Self::Context, Self::State>) -> Self;
    fn build(self, host: &str, port: u16) -> ReusableBoxFuture<()> ;

    // Provided method
    fn start(self, host: &str, port: u16)
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

source

fn new(_: App<Self::Request, Self::Context, Self::State>) -> Self

source

fn build(self, host: &str, port: u16) -> ReusableBoxFuture<()>

Provided Methods§

source

fn start(self, host: &str, port: u16)where Self: Sized,

Implementors§

source§

impl<T: Context<Response = Response> + Clone + Send + Sync, S: 'static + Send + Sync> ThrusterServer for Server<T, S>

§

type Context = T

§

type Response = Response

§

type Request = Request

§

type State = S