pub struct DeviceObject {
pub device: Device,
}Expand description
§Example
use twitter_archive::structs::phone_number::DeviceObject;
let json = r#"{
"device": {
"phoneNumber": "+15551234567"
}
}"#;
let data: DeviceObject = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.device.phone_number, "+15551234567");
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§device: DevicePossibly unnecessary level of indirection created by upstream
§Example JSON data
{
"device": {
"phoneNumber": "+15551234567"
}
}Trait Implementations§
Source§impl Clone for DeviceObject
impl Clone for DeviceObject
Source§fn clone(&self) -> DeviceObject
fn clone(&self) -> DeviceObject
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 DeviceObject
impl Debug for DeviceObject
Source§impl<'de> Deserialize<'de> for DeviceObject
impl<'de> Deserialize<'de> for DeviceObject
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 DeviceObject
impl Display for DeviceObject
Auto Trait Implementations§
impl Freeze for DeviceObject
impl RefUnwindSafe for DeviceObject
impl Send for DeviceObject
impl Sync for DeviceObject
impl Unpin for DeviceObject
impl UnwindSafe for DeviceObject
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