Trait Request

Source
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§

Source

fn serialize<S>(&self, serializer: S) -> S::Output
where 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.

Source§

fn serialize<S>(&self, serializer: S) -> S::Output
where S: Serializer,

Source§

impl<'a, R> Request for &'a R
where R: Request + ?Sized,

Source§

fn serialize<S>(&self, serializer: S) -> S::Output
where S: Serializer,

Source§

impl<'a, R> Request for &'a mut R
where R: Request + ?Sized,

Source§

fn serialize<S>(&self, serializer: S) -> S::Output
where S: Serializer,

Source§

impl<R: Request> Request for Option<R>

Source§

fn serialize<S>(&self, serializer: S) -> S::Output
where S: Serializer,

Implementors§

Source§

impl<I, K, V> Request for AssertSorted<I>
where I: Clone + Iterator<Item = (K, V)>, K: AsRef<str>, V: Display,

Source§

impl<K, V, A, P> Request for ParameterList<K, V, A, P>
where K: AsRef<str>, V: Display, A: AsRef<[P]>, P: Borrow<(K, V)>,