pub trait Request {
// Required method
fn serialize<S>(&self, serializer: S) -> S::Output
where S: Serializer;
}
Expand description
Types that represent an HTTP request to be authorized with OAuth.
Request
is an abstraction of a sequence of key-value pairs of a query part of a URI
and x-www-form-urlencoded
string.
This trait can be implemented automatically by
#[derive(Request)]
derive macro.
In most cases, you won’t need to implement it manually.
Required Methods§
Sourcefn serialize<S>(&self, serializer: S) -> S::Outputwhere
S: Serializer,
fn serialize<S>(&self, serializer: S) -> S::Outputwhere
S: Serializer,
Feeds a Serializer
implementation with the key-value pairs of the request
and returns the serializer’s output.
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.
Implementations on Foreign Types§
Source§impl Request for ()
Authorizes a request with no query pairs.
impl Request for ()
Authorizes a request with no query pairs.