This commit is contained in:
nora 2023-03-07 17:30:44 +01:00
parent bb02adf04e
commit c71413f2f7
3 changed files with 5 additions and 27 deletions

View file

@ -5,10 +5,7 @@
//! - The [`Accept`](Accept) trait used to asynchronously accept incoming
//! connections.
//! - Utilities like `poll_fn` to ease creating a custom `Accept`.
use crate::common::{
task::{self, Poll},
Pin,
};
#[cfg(feature = "stream")]
use futures_core::Stream;
#[cfg(feature = "stream")]

View file

@ -3,15 +3,14 @@ use super::accept::Accept;
use super::conn::Http as Http_;
#[cfg(all(feature = "tcp"))]
use super::tcp::AddrIncoming;
use crate::body::{Body, HttpBody};
use crate::body::Body;
use crate::common::exec::Exec;
use crate::common::exec::{ConnStreamExec, NewSvcExec};
use crate::common::{task, Future, Pin, Poll, Unpin};
use crate::common::exec::NewSvcExec;
use crate::common::{task, Future, Pin, Poll};
use crate::service::{HttpService, MakeServiceRef};
use pin_project_lite::pin_project;
use std::error::Error as StdError;
#[cfg(feature = "tcp")]
use tokio::io::{AsyncRead, AsyncWrite};
pub struct Server<I, S, E = Exec> {
incoming: I,
make_service: S,