Struct hyper_static_server::Server[][src]

pub struct Server { /* fields omitted */ }

Implementations

impl Server[src]

pub fn new(_configuration: Configuration) -> Result<Server, Error>[src]

impl Server[src]

pub fn run_and_wait(_configuration: Configuration) -> Result<(), Error>[src]

pub async fn run(_configuration: Configuration) -> Result<(), Error>[src]

pub fn serve_and_wait(&self) -> Result<(), Error>[src]

pub async fn serve(&'_ self) -> Result<(), Error>[src]

impl Server[src]

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

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

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

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

impl Server[src]

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

pub async fn serve_with_service_fn<S, SE, SF, SB, SBD, SBE>(
    &'_ self,
    _service: S
) -> Result<(), Error> where
    S: FnMut(Request<Body>) -> SF + Send + 'static + Clone,
    SE: Error + Send + Sync + 'static,
    SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
    SB: Body<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
) -> Result<(), Error> where
    S: Service<Request<Body>, Response = Response<SB>, Future = SF, Error = SE> + Send + 'static,
    M: FnMut(&Connection) -> MF + Send + 'static,
    SE: Error + Send + Sync + 'static,
    SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
    SB: Body<Data = SBD, Error = SBE> + Send + 'static,
    SBD: Buf + Send + 'static,
    SBE: Error + Send + Sync + 'static,
    MF: Future<Output = Result<S, ME>> + Send + 'static,
    ME: Error + Send + Sync + 'static, 
[src]

pub fn serve_protocol(&self) -> Result<Http<Exec>, Error>[src]

pub fn serve_runtime(&self) -> Result<Runtime, Error>[src]

Trait Implementations

impl Clone for Server[src]

Auto Trait Implementations

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> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,