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 deserializable response type.
Required Methods
sourcefn relative_path(&self) -> Cow<'_, str>
fn relative_path(&self) -> Cow<'_, str>
The endpoint relative path. Must start with a /