[−][src]Struct egg_mode::entities::MediaEntity
Represents a piece of media attached to a tweet.
The information in this struct is subtly different depending on what media is being referenced,
and which entity container is holding this instance. For videos and GIFs, the media_url and
media_url_https fields each link to a thumbnail image of the media, typically of the first
frame. The real video information can be found on the video_info field, including various
encodings if available.
Image links available in media_url and media_url_https can be obtained in different sizes by
appending a colon and one of the available sizes in the MediaSizes struct. For example, the
cropped thumbnail can be viewed by appending :thumb to the end of the URL, and the full-size
image can be viewed by appending :large.
Fields
display_url: StringA shortened URL to display to clients.
expanded_url: StringAn expanded version of display_url; links to the media display page.
id: u64A numeric ID for the media.
range: (usize, usize)The byte offsets where the media URL is located. The first index is the location of the first character of the URL; the second is the location of the first character following the URL.
media_url: StringA URL pointing directly to the media file. Uses HTTP as the protocol.
For videos and GIFs, this link will be to a thumbnail of the media, and the real video link
will be contained in video_info.
media_url_https: StringA URL pointing directly to the media file. Uses HTTPS as the protocol.
For videos and GIFs, this link will be to a thumbnail of the media, and the real video link
will be contained in video_info.
sizes: MediaSizesVarious sizes available for the media file.
source_status_id: Option<u64>For tweets containing media that was originally associated with a different tweet, this contains the ID of the original tweet.
media_type: MediaTypeThe type of media being represented.
url: StringThe t.co link from the original text.
video_info: Option<VideoInfo>For media entities corresponding to videos, this contains extra information about the linked video.
ext_alt_text: Option<String>Media alt text, if present.
Trait Implementations
impl Clone for MediaEntity[src]
fn clone(&self) -> MediaEntity[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for MediaEntity[src]
impl<'de> Deserialize<'de> for MediaEntity[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for MediaEntity
impl Send for MediaEntity
impl Sync for MediaEntity
impl Unpin for MediaEntity
impl UnwindSafe for MediaEntity
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,