Struct hyper_simple_server::Server[][src]

pub struct Server { /* fields omitted */ }

Implementations

impl Server[src]

pub fn new(_configuration: Configuration) -> ServerResult<Self>[src]

impl Server[src]

pub fn run_and_wait(_configuration: Configuration) -> ServerResult[src]

pub async fn run(_configuration: Configuration) -> ServerResult[src]

pub fn serve_and_wait(&self) -> ServerResult[src]

pub async fn serve(&self) -> ServerResult[src]

impl Server[src]

pub fn run_and_wait_with_handler<H, F>(
    _configuration: Configuration,
    _handler: H
) -> ServerResult where
    H: Handler<Future = F> + Send + Sync + 'static + Clone,
    F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static, 
[src]

pub async fn run_with_handler<H, F>(
    _configuration: Configuration,
    _handler: H
) -> ServerResult where
    H: Handler<Future = F> + Send + Sync + 'static + Clone,
    F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static, 
[src]

pub fn serve_and_wait_with_handler<H, F>(&self, _handler: H) -> ServerResult where
    H: Handler<Future = F> + Send + Sync + 'static + Clone,
    F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static, 
[src]

pub async fn serve_with_handler<H, F>(&self, _handler: H) -> ServerResult where
    H: Handler<Future = F> + Send + Sync + 'static + Clone,
    F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static, 
[src]

impl Server[src]

pub fn serve_builder(&self) -> ServerResult<Builder<Accepter, ServerExecutor>>[src]

pub async fn serve_with_service_fn<S, SE, SF, SB, SBD, SBE>(
    &self,
    _service: S
) -> ServerResult where
    S: FnMut(Request<Body>) -> SF + Send + 'static + Clone,
    SE: Error + Send + Sync + 'static,
    SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
    SB: BodyTrait<Data = SBD, Error = SBE> + Send + 'static,
    SBD: Buf + Send + 'static,
    SBE: Error + Send + Sync + 'static, 
[src]

pub async fn serve_with_make_service_fn<M, MF, ME, S, SF, SE, SB, SBD, SBE>(
    &self,
    _make_service: M
) -> ServerResult where
    M: FnMut(&Connection) -> MF + Send + 'static,
    MF: Future<Output = Result<S, ME>> + Send + 'static,
    ME: Error + Send + Sync + 'static,
    S: Service<Request<Body>, Response = Response<SB>, Future = SF, Error = SE> + Send + 'static,
    SE: Error + Send + Sync + 'static,
    SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
    SB: BodyTrait<Data = SBD, Error = SBE> + Send + 'static,
    SBD: Buf + Send + 'static,
    SBE: Error + Send + Sync + 'static, 
[src]

pub fn serve_protocol(&self) -> ServerResult<Http>[src]

pub fn serve_runtime(&self) -> ServerResult<Runtime>[src]

Trait Implementations

impl Clone for Server[src]

Auto Trait Implementations

impl RefUnwindSafe for Server

impl Send for Server

impl Sync for Server

impl Unpin for Server

impl UnwindSafe for Server

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.