Struct futures_http::server::HttpServer
source · pub struct HttpServer<I> { /* private fields */ }Implementations§
source§impl<I> HttpServer<I>
impl<I> HttpServer<I>
sourcepub fn on(label: Option<&str>, incoming: I) -> Self
pub fn on(label: Option<&str>, incoming: I) -> Self
Start http server with provided http incoming connection stream.
sourcepub async fn accept<S, E>(
&mut self,
) -> Result<(Request<BodyReader>, WriteHalf<S>)>
pub async fn accept<S, E>( &mut self, ) -> Result<(Request<BodyReader>, WriteHalf<S>)>
Accept new incoming http connection.
pub fn into_incoming<S, E>( self, ) -> impl Stream<Item = Result<(Request<BodyReader>, WriteHalf<S>)>> + Unpin
Auto Trait Implementations§
impl<I> Freeze for HttpServer<I>where
I: Freeze,
impl<I> RefUnwindSafe for HttpServer<I>where
I: RefUnwindSafe,
impl<I> Send for HttpServer<I>where
I: Send,
impl<I> Sync for HttpServer<I>where
I: Sync,
impl<I> Unpin for HttpServer<I>where
I: Unpin,
impl<I> UnwindSafe for HttpServer<I>where
I: 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