[][src]Struct lastfm_parse_rs::request::Request

pub struct Request<'rq, T> where
    T: RequestParams + Debug
{ pub base_url: &'rq str, pub api_key: &'rq str, pub secret: Option<&'rq str>, pub session: Option<&'rq str>, pub params: T, }

Request information associated with a method and lastfm data type. Can be converted to a Url. No POST request support yet.

Fields

base_url: &'rq strapi_key: &'rq strsecret: Option<&'rq str>session: Option<&'rq str>params: T

Methods

impl<'rq, T> Request<'rq, T> where
    T: RequestParams + Debug
[src]

pub fn new(
    base_url: &'rq str,
    api_key: &'rq str,
    secret: Option<&'rq str>,
    session: Option<&'rq str>,
    params: T
) -> Request<'rq, T>
[src]

Constructs new Request from given method and parameters

pub fn get_url(&self) -> Result<Url>[src]

Converts Request object to an Url and appends method parameters to the query.

  • Appends a session key for write API methods.
  • Signs write and auth API methods.

Trait Implementations

impl<'rq, T: Debug> Debug for Request<'rq, T> where
    T: RequestParams + Debug
[src]

impl<'rq, T> TryFrom<Request<'rq, T>> for Url where
    T: RequestParams + Debug
[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'rq, T> RefUnwindSafe for Request<'rq, T> where
    T: RefUnwindSafe

impl<'rq, T> Send for Request<'rq, T> where
    T: Send

impl<'rq, T> Sync for Request<'rq, T> where
    T: Sync

impl<'rq, T> Unpin for Request<'rq, T> where
    T: Unpin

impl<'rq, T> UnwindSafe for Request<'rq, T> where
    T: 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, 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.