pub trait GatewayRequest {
type Payload: Serialize + ?Sized;
type DecodedJson: DeserializeOwned;
type Result;
// Required methods
fn request_type(&self) -> GatewayRequestType;
fn get_endpoint(&self) -> String;
fn process_json(&self, decoded: Self::DecodedJson) -> Result<Self::Result>;
// Provided method
fn get_payload(&self) -> Option<&Self::Payload> { ... }
}
Expand description
Models requests to the gateway.