Enum InputInlineQueryResult

Source
pub enum InputInlineQueryResult {
    Animation(InputInlineQueryResultAnimation),
    Article(InputInlineQueryResultArticle),
    Audio(InputInlineQueryResultAudio),
    Contact(InputInlineQueryResultContact),
    Document(InputInlineQueryResultDocument),
    Game(InputInlineQueryResultGame),
    Location(InputInlineQueryResultLocation),
    Photo(InputInlineQueryResultPhoto),
    Sticker(InputInlineQueryResultSticker),
    Venue(InputInlineQueryResultVenue),
    Video(InputInlineQueryResultVideo),
    VoiceNote(InputInlineQueryResultVoiceNote),
    // some variants omitted
}
Expand description

Represents a single result of an inline query; for bots only

Variants§

§

Animation(InputInlineQueryResultAnimation)

Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video

§

Article(InputInlineQueryResultArticle)

Represents a link to an article or web page

§

Audio(InputInlineQueryResultAudio)

Represents a link to an MP3 audio file

§

Contact(InputInlineQueryResultContact)

Represents a user contact

§

Document(InputInlineQueryResultDocument)

Represents a link to a file

§

Game(InputInlineQueryResultGame)

Represents a game

§

Location(InputInlineQueryResultLocation)

Represents a point on the map

§

Photo(InputInlineQueryResultPhoto)

Represents link to a JPEG image

§

Sticker(InputInlineQueryResultSticker)

Represents a link to a WEBP or TGS sticker

§

Venue(InputInlineQueryResultVenue)

Represents information about a venue

§

Video(InputInlineQueryResultVideo)

Represents a link to a page containing an embedded video player or a video file

§

VoiceNote(InputInlineQueryResultVoiceNote)

Represents a link to an opus-encoded audio file within an OGG container, single channel audio

Implementations§

Source§

impl InputInlineQueryResult

Source

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

Source

pub fn is_animation(&self) -> bool

Source

pub fn is_article(&self) -> bool

Source

pub fn is_audio(&self) -> bool

Source

pub fn is_contact(&self) -> bool

Source

pub fn is_document(&self) -> bool

Source

pub fn is_game(&self) -> bool

Source

pub fn is_location(&self) -> bool

Source

pub fn is_photo(&self) -> bool

Source

pub fn is_sticker(&self) -> bool

Source

pub fn is_venue(&self) -> bool

Source

pub fn is_video(&self) -> bool

Source

pub fn is_voice_note(&self) -> bool

Source

pub fn on_animation<F: FnOnce(&InputInlineQueryResultAnimation)>( &self, fnc: F, ) -> &Self

Source

pub fn on_article<F: FnOnce(&InputInlineQueryResultArticle)>( &self, fnc: F, ) -> &Self

Source

pub fn on_audio<F: FnOnce(&InputInlineQueryResultAudio)>(&self, fnc: F) -> &Self

Source

pub fn on_contact<F: FnOnce(&InputInlineQueryResultContact)>( &self, fnc: F, ) -> &Self

Source

pub fn on_document<F: FnOnce(&InputInlineQueryResultDocument)>( &self, fnc: F, ) -> &Self

Source

pub fn on_game<F: FnOnce(&InputInlineQueryResultGame)>(&self, fnc: F) -> &Self

Source

pub fn on_location<F: FnOnce(&InputInlineQueryResultLocation)>( &self, fnc: F, ) -> &Self

Source

pub fn on_photo<F: FnOnce(&InputInlineQueryResultPhoto)>(&self, fnc: F) -> &Self

Source

pub fn on_sticker<F: FnOnce(&InputInlineQueryResultSticker)>( &self, fnc: F, ) -> &Self

Source

pub fn on_venue<F: FnOnce(&InputInlineQueryResultVenue)>(&self, fnc: F) -> &Self

Source

pub fn on_video<F: FnOnce(&InputInlineQueryResultVideo)>(&self, fnc: F) -> &Self

Source

pub fn on_voice_note<F: FnOnce(&InputInlineQueryResultVoiceNote)>( &self, fnc: F, ) -> &Self

Source

pub fn as_animation(&self) -> Option<&InputInlineQueryResultAnimation>

Source

pub fn as_article(&self) -> Option<&InputInlineQueryResultArticle>

Source

pub fn as_audio(&self) -> Option<&InputInlineQueryResultAudio>

Source

pub fn as_contact(&self) -> Option<&InputInlineQueryResultContact>

Source

pub fn as_document(&self) -> Option<&InputInlineQueryResultDocument>

Source

pub fn as_game(&self) -> Option<&InputInlineQueryResultGame>

Source

pub fn as_location(&self) -> Option<&InputInlineQueryResultLocation>

Source

pub fn as_photo(&self) -> Option<&InputInlineQueryResultPhoto>

Source

pub fn as_sticker(&self) -> Option<&InputInlineQueryResultSticker>

Source

pub fn as_venue(&self) -> Option<&InputInlineQueryResultVenue>

Source

pub fn as_video(&self) -> Option<&InputInlineQueryResultVideo>

Source

pub fn as_voice_note(&self) -> Option<&InputInlineQueryResultVoiceNote>

Source

pub fn animation<T: AsRef<InputInlineQueryResultAnimation>>(t: T) -> Self

Source

pub fn article<T: AsRef<InputInlineQueryResultArticle>>(t: T) -> Self

Source

pub fn audio<T: AsRef<InputInlineQueryResultAudio>>(t: T) -> Self

Source

pub fn contact<T: AsRef<InputInlineQueryResultContact>>(t: T) -> Self

Source

pub fn document<T: AsRef<InputInlineQueryResultDocument>>(t: T) -> Self

Source

pub fn game<T: AsRef<InputInlineQueryResultGame>>(t: T) -> Self

Source

pub fn location<T: AsRef<InputInlineQueryResultLocation>>(t: T) -> Self

Source

pub fn photo<T: AsRef<InputInlineQueryResultPhoto>>(t: T) -> Self

Source

pub fn sticker<T: AsRef<InputInlineQueryResultSticker>>(t: T) -> Self

Source

pub fn venue<T: AsRef<InputInlineQueryResultVenue>>(t: T) -> Self

Source

pub fn video<T: AsRef<InputInlineQueryResultVideo>>(t: T) -> Self

Source

pub fn voice_note<T: AsRef<InputInlineQueryResultVoiceNote>>(t: T) -> Self

Trait Implementations§

Source§

impl AsRef<InputInlineQueryResult> for InputInlineQueryResult

Source§

fn as_ref(&self) -> &InputInlineQueryResult

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for InputInlineQueryResult

Source§

fn clone(&self) -> InputInlineQueryResult

Returns a copy 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 InputInlineQueryResult

Source§

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

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

impl Default for InputInlineQueryResult

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for InputInlineQueryResult

Source§

fn deserialize<D>(deserializer: D) -> Result<InputInlineQueryResult, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl RObject for InputInlineQueryResult

Source§

fn to_json(&self) -> RTDResult<String>

Return td type to json string
Source§

impl Serialize for InputInlineQueryResult

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

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>,