Trait StripeClient

Source
pub trait StripeClient {
    type Err: StripeClientErr;

    // Required method
    fn execute(
        &self,
        req: CustomizedStripeRequest,
    ) -> impl Future<Output = Result<Bytes, Self::Err>>;
}
Expand description

An abstraction for defining HTTP clients capable of making Stripe API requests compatible with request information generated in the stripe request crates.

Required Associated Types§

Source

type Err: StripeClientErr

The error returned, either if the request failed due to an issue with client communicating with Stripe, or a client error returned by the Stripe API.

Required Methods§

Source

fn execute( &self, req: CustomizedStripeRequest, ) -> impl Future<Output = Result<Bytes, Self::Err>>

Make the API call.

§Errors

If the request failed due to an issue with client communication with Stripe, or a client error returned by the Stripe API.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§