[][src]Struct egg_mode::direct::DMEntities

pub struct DMEntities {
    pub hashtags: Vec<HashtagEntity>,
    pub symbols: Vec<HashtagEntity>,
    pub urls: Vec<UrlEntity>,
    pub user_mentions: Vec<MentionEntity>,
    pub media: Option<Vec<MediaEntity>>,
}

Container for URL, hashtag, mention, and media information associated with a direct message.

As far as entities are concerned, a DM can contain nearly everything a tweet can. The only thing that isn't present here is the "extended media" that would be on the tweet's extended_entities field. A user can attach a single picture to a DM via the Twitter website or official apps, so if that is present, it will be available in media. (Note that the functionality to send pictures through a DM is unavailable on the public API; only viewing them is possible.)

For all other fields, if the message contains no hashtags, financial symbols ("cashtags"), links, or mentions, those corresponding fields will still be present, just empty.

Fields

hashtags: Vec<HashtagEntity>

Collection of hashtags parsed from the DM.

symbols: Vec<HashtagEntity>

Collection of financial symbols, or "cashtags", parsed from the DM.

urls: Vec<UrlEntity>

Collection of URLs parsed from the DM.

user_mentions: Vec<MentionEntity>

Collection of user mentions parsed from the DM.

media: Option<Vec<MediaEntity>>

If the message contains any attached media, this contains a collection of media information from it.

Trait Implementations

impl Debug for DMEntities[src]

impl<'de> Deserialize<'de> for DMEntities[src]

Auto Trait Implementations

impl Send for DMEntities

impl Sync for DMEntities

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self