Skip to main content

LinkPreviewType

Enum LinkPreviewType 

Source
pub enum LinkPreviewType {
Show 38 variants Album(LinkPreviewTypeAlbum), Animation(LinkPreviewTypeAnimation), App(LinkPreviewTypeApp), Article(LinkPreviewTypeArticle), Audio(LinkPreviewTypeAudio), Background(LinkPreviewTypeBackground), ChannelBoost(LinkPreviewTypeChannelBoost), Chat(LinkPreviewTypeChat), DirectMessagesChat(LinkPreviewTypeDirectMessagesChat), Document(LinkPreviewTypeDocument), EmbeddedAnimationPlayer(LinkPreviewTypeEmbeddedAnimationPlayer), EmbeddedAudioPlayer(LinkPreviewTypeEmbeddedAudioPlayer), EmbeddedVideoPlayer(LinkPreviewTypeEmbeddedVideoPlayer), ExternalAudio(LinkPreviewTypeExternalAudio), ExternalVideo(LinkPreviewTypeExternalVideo), GiftAuction(LinkPreviewTypeGiftAuction), GiftCollection(LinkPreviewTypeGiftCollection), GroupCall, Invoice, LiveStory(LinkPreviewTypeLiveStory), Message, Photo(LinkPreviewTypePhoto), PremiumGiftCode, ShareableChatFolder, Sticker(LinkPreviewTypeSticker), StickerSet(LinkPreviewTypeStickerSet), Story(LinkPreviewTypeStory), StoryAlbum(LinkPreviewTypeStoryAlbum), SupergroupBoost(LinkPreviewTypeSupergroupBoost), Theme(LinkPreviewTypeTheme), Unsupported, UpgradedGift(LinkPreviewTypeUpgradedGift), User(LinkPreviewTypeUser), Video(LinkPreviewTypeVideo), VideoChat(LinkPreviewTypeVideoChat), VideoNote(LinkPreviewTypeVideoNote), VoiceNote(LinkPreviewTypeVoiceNote), WebApp(LinkPreviewTypeWebApp),
}

Variants§

§

Album(LinkPreviewTypeAlbum)

The link is a link to a media album consisting of photos and videos

§

Animation(LinkPreviewTypeAnimation)

The link is a link to an animation

§

App(LinkPreviewTypeApp)

The link is a link to an app at App Store or Google Play

§

Article(LinkPreviewTypeArticle)

The link is a link to a web site

§

Audio(LinkPreviewTypeAudio)

The link is a link to an audio

§

Background(LinkPreviewTypeBackground)

The link is a link to a background. Link preview title and description are available only for filled backgrounds

§

ChannelBoost(LinkPreviewTypeChannelBoost)

The link is a link to boost a channel chat

§

Chat(LinkPreviewTypeChat)

The link is a link to a chat

§

DirectMessagesChat(LinkPreviewTypeDirectMessagesChat)

The link is a link to a direct messages chat of a channel

§

Document(LinkPreviewTypeDocument)

The link is a link to a general file

§

EmbeddedAnimationPlayer(LinkPreviewTypeEmbeddedAnimationPlayer)

The link is a link to an animation player

§

EmbeddedAudioPlayer(LinkPreviewTypeEmbeddedAudioPlayer)

The link is a link to an audio player

§

EmbeddedVideoPlayer(LinkPreviewTypeEmbeddedVideoPlayer)

The link is a link to a video player

§

ExternalAudio(LinkPreviewTypeExternalAudio)

The link is a link to an audio file

§

ExternalVideo(LinkPreviewTypeExternalVideo)

The link is a link to a video file

§

GiftAuction(LinkPreviewTypeGiftAuction)

The link is a link to a gift auction

§

GiftCollection(LinkPreviewTypeGiftCollection)

The link is a link to a gift collection

§

GroupCall

The link is a link to a group call that isn’t bound to a chat

§

Invoice

The link is a link to an invoice

§

LiveStory(LinkPreviewTypeLiveStory)

The link is a link to a live story group call

§

Message

The link is a link to a text or a poll Telegram message

§

Photo(LinkPreviewTypePhoto)

The link is a link to a photo

§

PremiumGiftCode

The link is a link to a Telegram Premium gift code

§

ShareableChatFolder

The link is a link to a shareable chat folder

§

Sticker(LinkPreviewTypeSticker)

The link is a link to a sticker

§

StickerSet(LinkPreviewTypeStickerSet)

The link is a link to a sticker set

§

Story(LinkPreviewTypeStory)

The link is a link to a story. Link preview description is unavailable

§

StoryAlbum(LinkPreviewTypeStoryAlbum)

The link is a link to an album of stories

§

SupergroupBoost(LinkPreviewTypeSupergroupBoost)

The link is a link to boost a supergroup chat

§

Theme(LinkPreviewTypeTheme)

The link is a link to a cloud theme. TDLib has no theme support yet

§

Unsupported

The link preview type is unsupported yet

§

UpgradedGift(LinkPreviewTypeUpgradedGift)

The link is a link to an upgraded gift

§

User(LinkPreviewTypeUser)

The link is a link to a user

§

Video(LinkPreviewTypeVideo)

The link is a link to a video

§

VideoChat(LinkPreviewTypeVideoChat)

The link is a link to a video chat

§

VideoNote(LinkPreviewTypeVideoNote)

The link is a link to a video note message

§

VoiceNote(LinkPreviewTypeVoiceNote)

The link is a link to a voice note message

§

WebApp(LinkPreviewTypeWebApp)

The link is a link to a Web App

Trait Implementations§

Source§

impl Clone for LinkPreviewType

Source§

fn clone(&self) -> LinkPreviewType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LinkPreviewType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for LinkPreviewType

Source§

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 PartialEq for LinkPreviewType

Source§

fn eq(&self, other: &LinkPreviewType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for LinkPreviewType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for LinkPreviewType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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