Skip to main content

ApiRequest

Trait ApiRequest 

Source
pub trait ApiRequest: Sized {
    // Required methods
    fn api_version(self, version: &str) -> Self;
    fn api_key(self, key: &str) -> Self;
    fn idempotency_key(self, key: &str) -> Self;
}
Expand description

Fusion Stack’s request headers on a test request.

Required Methods§

Source

fn api_version(self, version: &str) -> Self

Pins the request to a version with the Api-Version header.

Source

fn api_key(self, key: &str) -> Self

Authenticates with an API key, as a bearer token.

Source

fn idempotency_key(self, key: &str) -> Self

Sends an Idempotency-Key, so a retry with the same key is replayed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ApiRequest for TestRequest

Source§

fn api_version(self, version: &str) -> Self

Source§

fn api_key(self, key: &str) -> Self

Source§

fn idempotency_key(self, key: &str) -> Self

Implementors§