pub trait Endpoint {
    type Query: Serialize;
    type Body: Serialize;
    type Response: DeserializeOwned;

    fn relative_path(&self) -> Cow<'_, str>;
    fn method(&self) -> Method;

    fn query(&self) -> Option<Self::Query> { ... }
    fn body(&self) -> Option<Self::Body> { ... }
    fn full_path(&self, is_sandbox: bool) -> String { ... }
}
Expand description

A trait implemented by api endpoints.

Required Associated Types

The serializable query type.

The serializable body type.

The deserializable response type.

Required Methods

The endpoint relative path. Must start with a /

The request method of this endpoint.

Provided Methods

The query to be used when calling this endpoint.

The body to be used when calling this endpoint.

The full path of this endpoint.

Automatically implemented.

Implementors