[][src]Enum rtdlib::types::TMeUrlType

pub enum TMeUrlType {
    ChatInvite(TMeUrlTypeChatInvite),
    StickerSet(TMeUrlTypeStickerSet),
    Supergroup(TMeUrlTypeSupergroup),
    User(TMeUrlTypeUser),
    // some variants omitted
}

Describes the type of a URL linking to an internal Telegram entity

Variants

A chat invite link

A URL linking to a sticker set

A URL linking to a public supergroup or channel

A URL linking to a user

Implementations

impl TMeUrlType[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_chat_invite(&self) -> bool[src]

pub fn is_sticker_set(&self) -> bool[src]

pub fn is_supergroup(&self) -> bool[src]

pub fn is_user(&self) -> bool[src]

pub fn on_chat_invite<F: FnOnce(&TMeUrlTypeChatInvite)>(&self, fnc: F) -> &Self[src]

pub fn on_sticker_set<F: FnOnce(&TMeUrlTypeStickerSet)>(&self, fnc: F) -> &Self[src]

pub fn on_supergroup<F: FnOnce(&TMeUrlTypeSupergroup)>(&self, fnc: F) -> &Self[src]

pub fn on_user<F: FnOnce(&TMeUrlTypeUser)>(&self, fnc: F) -> &Self[src]

pub fn as_chat_invite(&self) -> Option<&TMeUrlTypeChatInvite>[src]

pub fn as_sticker_set(&self) -> Option<&TMeUrlTypeStickerSet>[src]

pub fn as_supergroup(&self) -> Option<&TMeUrlTypeSupergroup>[src]

pub fn as_user(&self) -> Option<&TMeUrlTypeUser>[src]

pub fn chat_invite<T: AsRef<TMeUrlTypeChatInvite>>(t: T) -> Self[src]

pub fn sticker_set<T: AsRef<TMeUrlTypeStickerSet>>(t: T) -> Self[src]

pub fn supergroup<T: AsRef<TMeUrlTypeSupergroup>>(t: T) -> Self[src]

pub fn user<T: AsRef<TMeUrlTypeUser>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<TMeUrlType> for TMeUrlType[src]

impl Clone for TMeUrlType[src]

impl Debug for TMeUrlType[src]

impl Default for TMeUrlType[src]

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

impl RObject for TMeUrlType[src]

impl Serialize for TMeUrlType[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.