pub struct Server<S> { /* private fields */ }Expand description
A builder for running the HTTP server based on given HTTP service and configuration.
Implementations§
Source§impl<S> Server<S>where
S: NewHttpService<RequestBody = RequestBody> + Send + Sync + 'static,
S::ResponseBody: Payload + Send + 'static,
<S::ResponseBody as Payload>::Data: Send,
<S::ResponseBody as Payload>::Error: Into<Error>,
S::Service: Send + 'static,
S::Future: Send + 'static,
S::Error: Into<Error>,
<S::Service as HttpService>::Future: Send + 'static,
S::InitError: Fail,
impl<S> Server<S>where
S: NewHttpService<RequestBody = RequestBody> + Send + Sync + 'static,
S::ResponseBody: Payload + Send + 'static,
<S::ResponseBody as Payload>::Data: Send,
<S::ResponseBody as Payload>::Error: Into<Error>,
S::Service: Send + 'static,
S::Future: Send + 'static,
S::Error: Into<Error>,
<S::Service as HttpService>::Future: Send + 'static,
S::InitError: Fail,
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Server<S>where
S: Freeze,
impl<S> RefUnwindSafe for Server<S>where
S: RefUnwindSafe,
impl<S> Send for Server<S>where
S: Send,
impl<S> Sync for Server<S>where
S: Sync,
impl<S> Unpin for Server<S>where
S: Unpin,
impl<S> UnwindSafe for Server<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more