1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

refactor actix_http connection types and connector services (#2081)

This commit is contained in:
fakeshadow
2021-03-18 10:53:22 -07:00
committed by GitHub
parent abcb444dd9
commit b75b5114c3
16 changed files with 867 additions and 611 deletions

View File

@@ -121,7 +121,7 @@ pub mod test;
pub mod ws;
pub use self::builder::ClientBuilder;
pub use self::connect::{BoxedSocket, ConnectRequest, ConnectResponse, ConnectorService};
pub use self::connect::{BoxConnectorService, BoxedSocket, ConnectRequest, ConnectResponse};
pub use self::frozen::{FrozenClientRequest, FrozenSendBuilder};
pub use self::request::ClientRequest;
pub use self::response::{ClientResponse, JsonBody, MessageBody};
@@ -147,11 +147,12 @@ pub use self::sender::SendClientRequest;
/// }
/// ```
#[derive(Clone)]
pub struct Client(Rc<ClientConfig>);
pub struct Client(ClientConfig);
#[derive(Clone)]
pub(crate) struct ClientConfig {
pub(crate) connector: ConnectorService,
pub(crate) headers: HeaderMap,
pub(crate) connector: BoxConnectorService,
pub(crate) headers: Rc<HeaderMap>,
pub(crate) timeout: Option<Duration>,
}