pub struct TweetSource {
pub name: String,
pub url: String,
}Expand description
Represents the app from which a specific tweet was posted.
This struct is parsed out of the HTML anchor tag that Twitter returns as part of each tweet. This way you can format the source link however you like without having to parse the values out yourself.
Note that if you’re going to reconstruct a link from this, the source URL has rel="nofollow"
in the anchor tag.
Fields§
§name: StringThe name of the app, given by its developer.
url: StringThe URL for the app, given by its developer.
Trait Implementations§
Source§impl Clone for TweetSource
impl Clone for TweetSource
Source§fn clone(&self) -> TweetSource
fn clone(&self) -> TweetSource
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 TweetSource
impl Debug for TweetSource
Source§impl<'de> Deserialize<'de> for TweetSource
impl<'de> Deserialize<'de> for TweetSource
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 FromStr for TweetSource
impl FromStr for TweetSource
Auto Trait Implementations§
impl Freeze for TweetSource
impl RefUnwindSafe for TweetSource
impl Send for TweetSource
impl Sync for TweetSource
impl Unpin for TweetSource
impl UnwindSafe for TweetSource
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