[][src]Struct tweet::Media

pub struct Media {
    pub display_url: String,
    pub expanded_url: String,
    pub id: u64,
    pub id_str: String,
    pub indices: Vec<u32>,
    pub media_url: String,
    pub media_url_https: String,
    pub sizes: Sizes,
    pub source_status_id: Option<u64>,
    pub source_status_id_str: Option<String>,
    pub kind: MediaType,
    pub url: String,
    pub video_info: Option<VideoInfo>,
    pub additional_media_info: Option<AdditionalMediaInfo>,
}

Represents media that is associated with the tweet.

Fields

display_url: Stringexpanded_url: Stringid: u64id_str: Stringindices: Vec<u32>media_url: Stringmedia_url_https: Stringsizes: Sizessource_status_id: Option<u64>source_status_id_str: Option<String>kind: MediaType

The type of media

url: Stringvideo_info: Option<VideoInfo>additional_media_info: Option<AdditionalMediaInfo>

Methods

impl Media[src]

pub fn url(&self) -> Option<String>[src]

Returns the URL associated with this media object

This should ideally only return None if Twitter changes its API in the future.

Trait Implementations

impl Debug for Media[src]

impl Serialize for Media[src]

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

Auto Trait Implementations

impl Send for Media

impl Sync for Media

Blanket Implementations

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

impl<T> From<T> for 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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]