pub struct Organization {
pub name: String,
pub url: String,
pub privacy_policy_url: String,
pub terms_and_conditions_url: String,
}Expand description
§Example
use twitter_archive::structs::connected_application::Organization;
let json = r#"{
"name" : "Example",
"url" : "https://example.com",
"privacyPolicyUrl" : "https://example.com/policy/example-privacy-policy",
"termsAndConditionsUrl" : "https://example.com/policy/medium-terms-of-service"
}"#;
let data: Organization = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.name, "Example");
assert_eq!(data.url, "https://example.com");
assert_eq!(data.privacy_policy_url, "https://example.com/policy/example-privacy-policy");
assert_eq!(data.terms_and_conditions_url, "https://example.com/policy/medium-terms-of-service");
// Re-serialize is equivalent to original data without pretty printing
// assert_eq!(serde_json::to_string(&data).unwrap(), json.replace("\n", "").replace(" ", ""));Fields§
§name: String§url: StringWeb address of application, usually the “home” page
§Example JSON data
{ "url" : "https://example.com" }privacy_policy_url: StringWeb address of privacy policy for application
§Example JSON data
{ "privacyPolicyUrl" : "https://example.com/policy/example-privacy-policy" }terms_and_conditions_url: StringWeb address of terms and conditions policy for application
§Example JSON data
{ "termsAndConditionsUrl" : "https://example.com/policy/medium-terms-of-service" }Trait Implementations§
Source§impl Clone for Organization
impl Clone for Organization
Source§fn clone(&self) -> Organization
fn clone(&self) -> Organization
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Organization
impl Debug for Organization
Source§impl<'de> Deserialize<'de> for Organization
impl<'de> Deserialize<'de> for Organization
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Organization
impl Display for Organization
Auto Trait Implementations§
impl Freeze for Organization
impl RefUnwindSafe for Organization
impl Send for Organization
impl Sync for Organization
impl Unpin for Organization
impl UnwindSafe for Organization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more