Struct pandora_api::json::PandoraSession [−][src]
A builder to construct the properties of an http request to Pandora.
Implementations
impl PandoraSession[src]
pub fn new<T: ToEncryptionTokens, E: ToEndpoint>(
client: Option<Client>,
to_encryption_tokens: &T,
to_endpoint: &E
) -> Self[src]
client: Option<Client>,
to_encryption_tokens: &T,
to_endpoint: &E
) -> Self
Construct a new PandoraSession.
pub fn copy_session(&self) -> Self[src]
Create a new PandoraSession copying the endpoint and session values into the new object.
pub fn http_client(&self) -> &Client[src]
Get a reference to the http client.
pub fn endpoint<E: ToEndpoint>(&mut self, to_endpoint: E) -> &mut Self[src]
Set the Endpoint on this PandoraSession instance.
pub fn endpoint_mut<E: ToEndpoint>(&mut self) -> &mut Url[src]
Get a mutable reference to the endpoint url::Url to update or make calls on it.
pub fn update_partner_tokens<T: ToPartnerTokens>(
&mut self,
to_partner_tokens: &T
)[src]
&mut self,
to_partner_tokens: &T
)
Update the session partner tokens from type implementing ToPartnerTokens.
pub fn update_user_tokens<T: ToUserTokens>(&mut self, to_user_tokens: &T)[src]
Update the session partner tokens from type implementing ToPartnerTokens.
pub fn session_tokens(&self) -> &SessionTokens[src]
Get a reference to the session tokens to check the state or make calls on it.
pub fn session_tokens_mut(&mut self) -> &mut SessionTokens[src]
Get a mutable reference to the session tokens to modify the state or make calls on it.
pub fn json(&mut self, json: Value) -> &mut Self[src]
Set the json object on this PandoraSession instance.
When build() is called, the json object will be updated with session keys from the session instance, if one was provided.
pub fn json_mut(&mut self) -> &mut Value[src]
Get a mutable reference to the json to update or make calls on it.
pub fn arg(&mut self, key: &str, value: &str) -> &mut Self[src]
Add query arguments to the http request.
pub fn encrypted(&mut self) -> &mut Self[src]
Require that the request body be encrypted using the session instance, if any was set. If no session instance is set, this will silently transmit the data unencrypted.
pub fn build(&mut self) -> RequestBuilder[src]
Build a reqwest::blocking::Request, which can be inspected, modified, and executed with reqwest::blocking::Client::execute().
Trait Implementations
impl Clone for PandoraSession[src]
fn clone(&self) -> PandoraSession[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for PandoraSession[src]
Auto Trait Implementations
impl !RefUnwindSafe for PandoraSession
impl Send for PandoraSession
impl Sync for PandoraSession
impl Unpin for PandoraSession
impl !UnwindSafe for PandoraSession
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,