[−][src]Struct tower_h2::server::Server
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]
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>>,
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]
S: MakeService<(), Request<RecvBody>, Response = Response<B>>,
B: Body,
B::Data: 'static,
B::Error: Into<Box<dyn Error>>,
E: Clone,
pub fn serve<T>(&mut self, io: T) -> Connection<T, S, E, B, ()> where
T: AsyncRead + AsyncWrite,
[src]
T: AsyncRead + AsyncWrite,
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]
&mut self,
io: T,
modify: F
) -> Connection<T, S, E, B, F> where
T: AsyncRead + AsyncWrite,
F: Modify,
Trait Implementations
impl<S, E, B> Clone for Server<S, E, B> where
S: MakeService<(), Request<RecvBody>> + Clone,
E: Clone,
B: Body,
[src]
S: MakeService<(), Request<RecvBody>> + Clone,
E: Clone,
B: Body,
Auto Trait Implementations
impl<S, E, B> Send for Server<S, E, B> where
B: Send,
E: Send,
S: Send,
B: Send,
E: Send,
S: Send,
impl<S, E, B> Sync for Server<S, E, B> where
B: Sync,
E: Sync,
S: Sync,
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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.