PayjpClient

Trait PayjpClient 

Source
pub trait PayjpClient {
    type Err: PayjpClientErr;

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

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

Required Associated Types§

Source

type Err: PayjpClientErr

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

Required Methods§

Source

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

Make the API call.

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§