pub struct LikeObject {
pub like: Like,
}Expand description
§Example
use twitter_archive::structs::like::LikeObject;
let json = r#"{
"like": {
"tweetId": "1697051672621597026",
"fullText": "https://t.co/IaCJlkaweW",
"expandedUrl": "https://twitter.com/i/web/status/1697051672621597026"
}
}"#;
let data: LikeObject = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.like.tweet_id, "1697051672621597026");
assert_eq!(data.like.full_text.clone().unwrap(), "https://t.co/IaCJlkaweW");
assert_eq!(data.like.expanded_url, "https://twitter.com/i/web/status/1697051672621597026");
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§like: Like§Example JSON data
{
"like": {
"tweetId": "1697051672621597026",
"fullText": "https://t.co/IaCJlkaweW",
"expandedUrl": "https://twitter.com/i/web/status/1697051672621597026"
}
}Trait Implementations§
Source§impl Clone for LikeObject
impl Clone for LikeObject
Source§fn clone(&self) -> LikeObject
fn clone(&self) -> LikeObject
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 LikeObject
impl Debug for LikeObject
Source§impl<'de> Deserialize<'de> for LikeObject
impl<'de> Deserialize<'de> for LikeObject
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 LikeObject
impl Display for LikeObject
Auto Trait Implementations§
impl Freeze for LikeObject
impl RefUnwindSafe for LikeObject
impl Send for LikeObject
impl Sync for LikeObject
impl Unpin for LikeObject
impl UnwindSafe for LikeObject
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