pub struct AccountTimezoneObject {
pub account_timezone: AccountTimezone,
}Expand description
§Example
use twitter_archive::structs::account_timezone::AccountTimezoneObject;
let json = r#"{
"accountTimezone": {
"accountId": "111111111",
"timeZone": "Arizona"
}
}"#;
let data: AccountTimezoneObject = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.account_timezone.account_id, "111111111");
assert_eq!(data.account_timezone.time_zone, "Arizona");
// Re-serialize is equivalent to original data without pretty printing
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§account_timezone: AccountTimezoneWhy they wrapped a list of time zones within unnecessary object label is anyone’s guess
§Example JSON data
{
"accountTimezone": {
"accountId": "111111111",
"timeZone": "Arizona"
}
}Trait Implementations§
Source§impl Clone for AccountTimezoneObject
impl Clone for AccountTimezoneObject
Source§fn clone(&self) -> AccountTimezoneObject
fn clone(&self) -> AccountTimezoneObject
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 AccountTimezoneObject
impl Debug for AccountTimezoneObject
Source§impl<'de> Deserialize<'de> for AccountTimezoneObject
impl<'de> Deserialize<'de> for AccountTimezoneObject
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 AccountTimezoneObject
impl Display for AccountTimezoneObject
Auto Trait Implementations§
impl Freeze for AccountTimezoneObject
impl RefUnwindSafe for AccountTimezoneObject
impl Send for AccountTimezoneObject
impl Sync for AccountTimezoneObject
impl Unpin for AccountTimezoneObject
impl UnwindSafe for AccountTimezoneObject
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