pub struct Server<S, B> { /* private fields */ }
Expand description
Server implemenation for hyper
Implementations§
Source§impl<S, B> Server<S, B>where
S: MakeService<(), Request<Body>, Response = Response<B>> + Send + 'static,
S::MakeError: Into<Box<dyn Error + Send + Sync>>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
S::Future: Send,
S::Service: Service<Request<Body>> + Send,
<S::Service as Service<Request<Body>>>::Future: Send + 'static,
B: HttpBody + Send + 'static,
B::Data: Send + 'static,
B::Error: Into<Box<dyn Error + Send + Sync>> + 'static,
impl<S, B> Server<S, B>where
S: MakeService<(), Request<Body>, Response = Response<B>> + Send + 'static,
S::MakeError: Into<Box<dyn Error + Send + Sync>>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
S::Future: Send,
S::Service: Service<Request<Body>> + Send,
<S::Service as Service<Request<Body>>>::Future: Send + 'static,
B: HttpBody + Send + 'static,
B::Data: Send + 'static,
B::Error: Into<Box<dyn Error + Send + Sync>> + 'static,
Trait Implementations§
Auto Trait Implementations§
impl<S, B> Freeze for Server<S, B>where
S: Freeze,
impl<S, B> RefUnwindSafe for Server<S, B>where
S: RefUnwindSafe,
B: RefUnwindSafe,
impl<S, B> Send for Server<S, B>
impl<S, B> Sync for Server<S, B>
impl<S, B> Unpin for Server<S, B>
impl<S, B> UnwindSafe for Server<S, B>where
S: UnwindSafe,
B: 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