Skip to main content

EncodeUrl

Trait EncodeUrl 

Source
pub trait EncodeUrl {
Show 19 methods // Required methods fn npsso(&self) -> Option<&str>; fn access_token(&self) -> Option<&str>; fn refresh_token(&self) -> &str; fn region(&self) -> &str; fn self_online_id(&self) -> &str; fn language(&self) -> &str; // Provided methods fn oauth_token_encode() -> [(&'static str, &'static str); 4] { ... } fn oauth_token_refresh_encode(&self) -> [(&'static str, &str); 7] { ... } fn profile_encode(&self, online_id: &str) -> String { ... } fn trophy_summary_encode(&self, online_id: &str, offset: u32) -> String { ... } fn trophy_set_encode( &self, online_id: &str, np_communication_id: &str, ) -> String { ... } fn message_threads_encode(&self, offset: u32) -> String { ... } fn message_thread_encode(&self, thread_id: &str) -> String { ... } fn generate_thread_encode(&self) -> String { ... } fn leave_message_thread_encode(&self, thread_id: &str) -> String { ... } fn send_message_encode(&self, thread_id: &str) -> String { ... } fn store_search_encode( lang: &str, region: &str, age: &str, name: &str, ) -> String { ... } fn store_item_encode( lang: &str, region: &str, age: &str, game_id: &str, ) -> String { ... } fn generate_boundary() -> String { ... }
}
Expand description

serde_urlencoded can be used to make a application/x-wwww-url-encoded String buffer from form it applies to EncodeUrl methods return a slice type. examples if your http client don’t support auto urlencode convert.

use psn_api_rs::{PSN, EncodeUrl};
use serde_urlencoded;
impl PSN {
    fn url_query_string(&self) -> String {
        serde_urlencoded::to_string(&self.np_sso_url_encode()).unwrap()
    }
}

Required Methods§

Source

fn npsso(&self) -> Option<&str>

Source

fn access_token(&self) -> Option<&str>

Source

fn refresh_token(&self) -> &str

Source

fn region(&self) -> &str

Source

fn self_online_id(&self) -> &str

Source

fn language(&self) -> &str

Provided Methods§

Source

fn oauth_token_encode() -> [(&'static str, &'static str); 4]

Source

fn oauth_token_refresh_encode(&self) -> [(&'static str, &str); 7]

Source

fn profile_encode(&self, online_id: &str) -> String

Source

fn trophy_summary_encode(&self, online_id: &str, offset: u32) -> String

Source

fn trophy_set_encode( &self, online_id: &str, np_communication_id: &str, ) -> String

Source

fn message_threads_encode(&self, offset: u32) -> String

Source

fn message_thread_encode(&self, thread_id: &str) -> String

Source

fn generate_thread_encode(&self) -> String

Source

fn leave_message_thread_encode(&self, thread_id: &str) -> String

Source

fn send_message_encode(&self, thread_id: &str) -> String

Source

fn store_search_encode( lang: &str, region: &str, age: &str, name: &str, ) -> String

Source

fn store_item_encode( lang: &str, region: &str, age: &str, game_id: &str, ) -> String

Source

fn generate_boundary() -> String

boundary is used to when making multipart request to PSN.

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.

Implementors§