Skip to main content

ReqwestClient

Derive Macro ReqwestClient 

Source
#[derive(ReqwestClient)]
{
    // Attributes available to this derive:
    #[openapi_trait]
}
Expand description

Derive support for user-owned reqwest client carrier structs.

The derive looks for fields named client and base_url by default. Override those conventions with #[openapi_trait(client)] and #[openapi_trait(base_url)] on the corresponding fields. Derive the reqwest client carrier trait for a user-owned struct.

By default, the derive expects named fields called client and base_url. You can override those conventions with field attributes: #[openapi_trait(client)] and #[openapi_trait(base_url)].