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