pub struct Interest {
pub name: String,
pub is_disabled: bool,
}Expand description
§Example
use twitter_archive::structs::personalization::Interest;
let json = r##"{
"name": "#HappyFriday",
"isDisabled": false
}"##;
let data: Interest = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.name, "#HappyFriday");
assert_eq!(data.is_disabled, false);
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§name: String§Example JSON data
{ "name": "#HappyFriday" }is_disabled: bool§Example JSON data
{ "isDisabled": false }Trait Implementations§
Source§impl<'de> Deserialize<'de> for Interest
impl<'de> Deserialize<'de> for Interest
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
Auto Trait Implementations§
impl Freeze for Interest
impl RefUnwindSafe for Interest
impl Send for Interest
impl Sync for Interest
impl Unpin for Interest
impl UnwindSafe for Interest
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