Request

Trait Request 

Source
pub trait Request: Serialize {
    type Response: DeserializeOwned;

    const ENDPOINT: &'static str;
}
Expand description

API request.

Request type is Serialize with associated response type Response and endpoint name ENDPOINT.

Required Associated Constants§

Source

const ENDPOINT: &'static str

The name of the corresponding endpoint.

Required Associated Types§

Source

type Response: DeserializeOwned

Response type of this 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.

Implementations on Foreign Types§

Source§

impl<R> Request for &R
where R: Request + ?Sized,

Source§

const ENDPOINT: &'static str = R::ENDPOINT

Source§

type Response = <R as Request>::Response

Source§

impl<R> Request for &mut R
where R: Request + ?Sized,

Source§

const ENDPOINT: &'static str = R::ENDPOINT

Source§

type Response = <R as Request>::Response

Source§

impl<R> Request for Box<R>
where R: Request + ?Sized,

Source§

const ENDPOINT: &'static str = R::ENDPOINT

Source§

type Response = <R as Request>::Response

Implementors§