pub struct ProfileDescription {
pub bio: String,
pub website: String,
pub location: String,
}Expand description
§Example
use twitter_archive::structs::profile::ProfileDescription;
let json = r#"{
"bio": "Howdy!",
"website": "https://t.co/6VtgySlriu",
"location": ""
}"#;
let data: ProfileDescription = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.bio, "Howdy!");
assert_eq!(data.website, "https://t.co/6VtgySlriu");
assert_eq!(data.location, "");
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§bio: String§Example JSON data
{ "bio": "Howdy!" }website: String§Example JSON data
{ "website": "https://t.co/6VtgySlriu" }location: String§Example JSON data
{ "location": "" }Trait Implementations§
Source§impl Clone for ProfileDescription
impl Clone for ProfileDescription
Source§fn clone(&self) -> ProfileDescription
fn clone(&self) -> ProfileDescription
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 ProfileDescription
impl Debug for ProfileDescription
Source§impl<'de> Deserialize<'de> for ProfileDescription
impl<'de> Deserialize<'de> for ProfileDescription
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 ProfileDescription
impl Display for ProfileDescription
Auto Trait Implementations§
impl Freeze for ProfileDescription
impl RefUnwindSafe for ProfileDescription
impl Send for ProfileDescription
impl Sync for ProfileDescription
impl Unpin for ProfileDescription
impl UnwindSafe for ProfileDescription
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