1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
mod request_strategy;
mod stripe;

mod base {
    #[cfg(any(
        feature = "runtime-tokio-hyper",
        feature = "runtime-tokio-hyper-rustls",
        feature = "runtime-tokio-hyper-rustls-webpki",
        feature = "runtime-blocking",
        feature = "runtime-blocking-rustls",
        feature = "runtime-blocking-rustls-webpki",
    ))]
    pub mod tokio;

    #[cfg(feature = "runtime-async-std-surf")]
    pub mod async_std;

    #[cfg(any(
        feature = "runtime-blocking",
        feature = "runtime-blocking-rustls",
        feature = "runtime-blocking-rustls-webpki"
    ))]
    pub mod tokio_blocking;
}

#[cfg(any(
    feature = "runtime-blocking",
    feature = "runtime-blocking-rustls",
    feature = "runtime-blocking-rustls-webpki"
))]
pub(crate) mod config {
    pub(crate) use super::base::tokio_blocking::{err, ok};
    pub use super::base::tokio_blocking::{Response, TokioBlockingClient as BaseClient};
}

#[cfg(any(
    feature = "runtime-tokio-hyper",
    feature = "runtime-tokio-hyper-rustls",
    feature = "runtime-tokio-hyper-rustls-webpki"
))]
pub(crate) mod config {
    pub(crate) use super::base::tokio::{err, ok};
    pub use super::base::tokio::{Response, TokioClient as BaseClient};
}

#[cfg(feature = "runtime-async-std-surf")]
pub(crate) mod config {
    pub(crate) use super::base::async_std::{err, ok};
    pub use super::base::async_std::{AsyncStdClient as BaseClient, Response};
}

pub use config::BaseClient;
/// An alias for `Result`.
///
/// If `blocking` is enabled, defined as:
///
/// ```rust,ignore
/// type Response<T> = Result<T, Error>;
/// ```
///
/// If the `async` feature is enabled, this type is defined as:
///
/// ```rust,ignore
/// type Response<T> = Box<dyn Future<Result<T, Error>>>;
/// ```
pub use config::Response;
pub use request_strategy::RequestStrategy;

pub use self::stripe::Client;