pub trait Endpoint {
type Request: Serialize + Send + Sync;
type Response: DeserializeOwned + Send + Sync;
// Required methods
fn endpoint(&self) -> Cow<'static, str>;
fn body(&self) -> &Self::Request;
// Provided method
fn method(&self) -> Method { ... }
}
Expand description
A trait for providing the necessary information for a single REST API endpoint.