[][src]Struct tower_hyper::server::Server

pub struct Server<S, B> { /* fields omitted */ }

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]

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]

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]

Serve the io stream via the provided hyper http settings

Trait Implementations

impl<S: Debug, B: Debug> Debug for Server<S, B>[src]

Auto Trait Implementations

impl<S, B> Unpin for Server<S, B> where
    B: Unpin,
    S: Unpin

impl<S, B> Sync for Server<S, B> where
    B: Sync,
    S: Sync

impl<S, B> Send for Server<S, B> where
    B: Send,
    S: Send

impl<S, B> UnwindSafe for Server<S, B> where
    B: UnwindSafe,
    S: UnwindSafe

impl<S, B> RefUnwindSafe for Server<S, B> where
    B: RefUnwindSafe,
    S: RefUnwindSafe

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T