[−][src]Struct tower_hyper::server::Server
Server implemenation for hyper
Methods
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, [src]
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,
pub fn new(maker: S) -> Self[src]
Create a new server from a MakeService
pub fn serve<I>(&mut self, io: I) -> Serve<S::MakeError> where
I: AsyncRead + AsyncWrite + Send + 'static, [src]
I: AsyncRead + AsyncWrite + Send + 'static,
Serve the io stream via default hyper http settings
pub fn serve_with<I>(&mut self, io: I, http: Http) -> Serve<S::MakeError> where
I: AsyncRead + AsyncWrite + Send + 'static, [src]
I: AsyncRead + AsyncWrite + Send + 'static,
Serve the io stream via the provided hyper http settings
Trait Implementations
Auto Trait Implementations
impl<S, B> Send for Server<S, B> where
B: Send,
S: Send,
B: Send,
S: Send,
impl<S, B> Sync for Server<S, B> where
B: Sync,
S: Sync,
B: Sync,
S: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,