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§
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
Sourcefn generate_boundary() -> String
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.