Struct Urlencoder

Source
pub struct Urlencoder<W = String> { /* private fields */ }
Expand description

A Serializer that produces a URI query or an x-www-form-urlencoded string from a request.

Implementations§

Source§

impl Urlencoder

Source

pub fn form() -> Self

Available on crate feature alloc only.

Creates a Urlencoder that produces an x-www-form-urlencoded string.

Source§

impl<W> Urlencoder<W>
where W: Write,

Source

pub fn form_with_buf(buf: W) -> Self

Same with form but writes the resulting form string into buf.

Source

pub fn query(uri: W) -> Self

Creates a Urlencoder that appends a query part to the given URI.

Trait Implementations§

Source§

impl<W: Clone> Clone for Urlencoder<W>

Source§

fn clone(&self) -> Urlencoder<W>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<W: Debug> Debug for Urlencoder<W>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<W: Write> Serializer for Urlencoder<W>

Source§

type Output = W

The type of the value produced by this serializer.
Source§

fn serialize_parameter<V>(&mut self, key: &str, value: V)
where V: Display,

Serializes a key-value pair. Read more
Source§

fn serialize_parameter_encoded<V>(&mut self, key: &str, value: V)
where V: Display,

Serializes a key-value pair. Read more
Source§

fn serialize_oauth_callback(&mut self)

Appends oauth_callback parameter to the Authorization header. Read more
Source§

fn serialize_oauth_consumer_key(&mut self)

Appends oauth_consumer_key parameter to the Authorization header. Read more
Source§

fn serialize_oauth_nonce(&mut self)

Appends oauth_nonce parameter to the Authorization header. Read more
Source§

fn serialize_oauth_signature_method(&mut self)

Appends oauth_signature_method parameter to the Authorization header. Read more
Source§

fn serialize_oauth_timestamp(&mut self)

Appends oauth_timestamp parameter to the Authorization header. Read more
Source§

fn serialize_oauth_token(&mut self)

Appends oauth_token parameter to the Authorization header. Read more
Source§

fn serialize_oauth_verifier(&mut self)

Appends oauth_verifier parameter to the Authorization header. Read more
Source§

fn serialize_oauth_version(&mut self)

Appends oauth_version parameter to the Authorization header. Read more
Source§

fn end(self) -> Self::Output

Finalizes the serialization and returns the serialized value.

Auto Trait Implementations§

§

impl<W> Freeze for Urlencoder<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for Urlencoder<W>
where W: RefUnwindSafe,

§

impl<W> Send for Urlencoder<W>
where W: Send,

§

impl<W> Sync for Urlencoder<W>
where W: Sync,

§

impl<W> Unpin for Urlencoder<W>
where W: Unpin,

§

impl<W> UnwindSafe for Urlencoder<W>
where W: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S> SerializerExt for S
where S: Serializer,

Source§

fn serialize_oauth_parameters(&mut self)

Appends all oauth_* parameter to the Authorization header.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V