pub struct FollowerObject {
pub follower: Follow,
}Expand description
§Example
use twitter_archive::structs::follower::FollowerObject;
let json = r#"{
"follower": {
"accountId": "2222222222222222222",
"userLink": "https://twitter.com/intent/user?user_id=2222222222222222222"
}
}"#;
let data: FollowerObject = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.follower.account_id, "2222222222222222222");
assert_eq!(data.follower.user_link, "https://twitter.com/intent/user?user_id=2222222222222222222");
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§follower: Follow§Example JSON data
{
"follower": {
"accountId": "2222222222222222222",
"userLink": "https://twitter.com/intent/user?user_id=2222222222222222222"
}
}Trait Implementations§
Source§impl Clone for FollowerObject
impl Clone for FollowerObject
Source§fn clone(&self) -> FollowerObject
fn clone(&self) -> FollowerObject
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 FollowerObject
impl Debug for FollowerObject
Source§impl<'de> Deserialize<'de> for FollowerObject
impl<'de> Deserialize<'de> for FollowerObject
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 FollowerObject
impl Display for FollowerObject
Auto Trait Implementations§
impl Freeze for FollowerObject
impl RefUnwindSafe for FollowerObject
impl Send for FollowerObject
impl Sync for FollowerObject
impl Unpin for FollowerObject
impl UnwindSafe for FollowerObject
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