[][src]Struct tower_h2::server::Server

pub struct Server<S, E, B> where
    S: MakeService<(), Request<RecvBody>>,
    B: Body
{ /* fields omitted */ }

Attaches service implementations to h2 connections.

Methods

impl<S, E, B> Server<S, E, B> where
    S: MakeService<(), Request<RecvBody>, Response = Response<B>>,
    S::Error: Into<Box<dyn Error>>,
    B: Body + 'static,
    B::Error: Into<Box<dyn Error>>,
    E: Clone + Executor<Background<<S::Service as Service<Request<RecvBody>>>::Future, B>>, 
[src]

pub fn new(new_service: S, builder: Builder, executor: E) -> Self[src]

impl<S, E, B> Server<S, E, B> where
    S: MakeService<(), Request<RecvBody>, Response = Response<B>>,
    B: Body,
    B::Data: 'static,
    B::Error: Into<Box<dyn Error>>,
    E: Clone
[src]

pub fn serve<T>(&mut self, io: T) -> Connection<T, S, E, B, ()> where
    T: AsyncRead + AsyncWrite
[src]

Produces a future that is satisfied once the h2 connection has been initialized.

pub fn serve_modified<T, F>(
    &mut self,
    io: T,
    modify: F
) -> Connection<T, S, E, B, F> where
    T: AsyncRead + AsyncWrite,
    F: Modify
[src]

Trait Implementations

impl<S, E, B> Clone for Server<S, E, B> where
    S: MakeService<(), Request<RecvBody>> + Clone,
    E: Clone,
    B: Body
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> Erased for T