pub trait Request: Serialize {
type Response: DeserializeOwned;
// Provided methods
fn method() -> Option<&'static str> { ... }
fn build_url<T: Display>(_: T) -> Option<String> { ... }
}Expand description
Trait for convenient work with different types of requests and simultaneous connection with the response data type using the trait associated types
Required Associated Types§
Sourcetype Response: DeserializeOwned
type Response: DeserializeOwned
Response type that can be deserialized with serde
Provided 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.