pub trait Req: Serialize + DeserializeOwned {
type Response: Serialize + DeserializeOwned;
const METHOD: &'static str;
// Required method
fn path(&self) -> String;
}Expand description
Describes a request.
Any type that implements Req should be correctly handled
if sent to the server with specified PATH and METHOD.
Required Associated Constants§
Required Associated Types§
Sourcetype Response: Serialize + DeserializeOwned
type Response: Serialize + DeserializeOwned
The JSON body of response.
Required Methods§
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.