Trait lifxi::http::AsRequest

source ·
pub trait AsRequest<S: Serialize> {
    fn method() -> Method;
    fn client(&self) -> &Client;
    fn path(&self) -> String;
    fn body(&self) -> &S;
    fn attempts(&self) -> NonZeroU8;
}
Expand description

Trait enabling conversion of non-terminal request builders to requests.

Required Methods

The HTTP verb to be used.

A reference to the shared client (so we can reuse it).

The relative path (to the API root) of the appropriate endpoint.

The request body to be used, as configured by the user.

The number of attempts to be made.

Implementors