[][src]Struct oauth1_request::serializer::auth::Authorizer

pub struct Authorizer<'a, SM: SignatureMethod> { /* fields omitted */ }

A Serializer that produces an HTTP Authorization header string by signing a request in OAuth 1.0 protocol.

Implementations

impl<'a, SM: SignatureMethod> Authorizer<'a, SM>[src]

pub fn new<T: Display>(
    method: &str,
    uri: T,
    client: Credentials<&'a str>,
    token: Option<Credentials<&'a str>>,
    options: &'a Options<'a>
) -> Self where
    SM: Default
[src]

Creates an Authorizer.

uri must not contain a query part. Otherwise, the serializer will produce a wrong signature.

Panics

In debug builds, panics if uri contains a '?' character.

pub fn with_signature_method<T: Display>(
    signature_method: SM,
    method: &str,
    uri: T,
    client: Credentials<&'a str>,
    token: Option<Credentials<&'a str>>,
    options: &'a Options<'a>
) -> Self
[src]

Same as new except that this uses signature_method as the signature method.

Trait Implementations

impl<'a, SM: Clone + SignatureMethod> Clone for Authorizer<'a, SM> where
    SM::Sign: Clone
[src]

impl<'a, SM: Debug + SignatureMethod> Debug for Authorizer<'a, SM> where
    SM::Sign: Debug
[src]

impl<'a, SM: SignatureMethod> Serializer for Authorizer<'a, SM>[src]

type Output = String

The type of the value produced by this serializer.

Auto Trait Implementations

impl<'a, SM> RefUnwindSafe for Authorizer<'a, SM> where
    <SM as SignatureMethod>::Sign: RefUnwindSafe

impl<'a, SM> Send for Authorizer<'a, SM> where
    <SM as SignatureMethod>::Sign: Send

impl<'a, SM> Sync for Authorizer<'a, SM> where
    <SM as SignatureMethod>::Sign: Sync

impl<'a, SM> Unpin for Authorizer<'a, SM> where
    <SM as SignatureMethod>::Sign: Unpin

impl<'a, SM> UnwindSafe for Authorizer<'a, SM> where
    <SM as SignatureMethod>::Sign: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<S> SerializerExt for S where
    S: Serializer
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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