AirLabsRequest

Trait AirLabsRequest 

Source
pub trait AirLabsRequest: Serialize {
    type Response: DeserializeOwned;
    type ResponseFree: DeserializeOwned;

    const METHOD: &'static str;

    // Provided method
    fn url(&self, base: &str) -> String { ... }
}
Expand description

For the AirLabs API request structure (that is serializable into query parameters) this trait captures the shape of the response, both its regular and free versions.

Required Associated Constants§

Source

const METHOD: &'static str

The name of the API method.

Required Associated Types§

Source

type Response: DeserializeOwned

The shape of the regular response.

Source

type ResponseFree: DeserializeOwned

The shape of the free response.

Provided Methods§

Source

fn url(&self, base: &str) -> String

Builds the URL for the API request.

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§