pub trait Request {
type Request: Encodable;
type Response: Decodable;
type Query: ToQuery;
// Required methods
fn path(&self) -> Cow<'_, str>;
fn body(&self) -> Self::Request;
fn query(&self) -> Self::Query;
fn method(&self) -> Method;
// Provided method
fn uri(&self) -> String { ... }
}Expand description
HTTP Request.
This trait defines an arbitrary HTTP request.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".