Enum tbot::types::inline_query::result::Kind[][src]

#[non_exhaustive]
#[must_use]
pub enum Kind {
Show variants Article(Article), Audio(Audio), Contact(Contact), Document(Document), Game(Game), Gif(Gif), Location(Location), Mpeg4Gif(Mpeg4Gif), Photo(Photo), Sticker(Sticker), Venue(Venue), Video(Video), Voice(Voice),
}

Represents different kinds of inline_query::Result.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Article(Article)

An article.

Audio(Audio)

An audio.

Contact(Contact)

A contact.

Document(Document)

A document.

Game(Game)

A game.

Gif(Gif)

A GIF.

Location(Location)

A location.

Mpeg4Gif(Mpeg4Gif)

A MPEG-4 GIF.

Photo(Photo)

A photo.

Sticker(Sticker)

A sticker.

Venue(Venue)

A venue.

Video(Video)

A video.

Voice(Voice)

A voice.

Implementations

impl Kind[src]

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

Returns true if self is of variant Article.

pub fn expect_article(self) -> Article where
    Self: Debug
[src]

Unwraps the value, yielding the content of Article.

Panics

Panics if the value is not Article, with a panic message including the content of self.

pub fn article(self) -> Option<Article>[src]

Returns Some if self is of variant Article, and None otherwise.

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

Returns true if self is of variant Audio.

pub fn expect_audio(self) -> Audio where
    Self: Debug
[src]

Unwraps the value, yielding the content of Audio.

Panics

Panics if the value is not Audio, with a panic message including the content of self.

pub fn audio(self) -> Option<Audio>[src]

Returns Some if self is of variant Audio, and None otherwise.

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

Returns true if self is of variant Contact.

pub fn expect_contact(self) -> Contact where
    Self: Debug
[src]

Unwraps the value, yielding the content of Contact.

Panics

Panics if the value is not Contact, with a panic message including the content of self.

pub fn contact(self) -> Option<Contact>[src]

Returns Some if self is of variant Contact, and None otherwise.

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

Returns true if self is of variant Document.

pub fn expect_document(self) -> Document where
    Self: Debug
[src]

Unwraps the value, yielding the content of Document.

Panics

Panics if the value is not Document, with a panic message including the content of self.

pub fn document(self) -> Option<Document>[src]

Returns Some if self is of variant Document, and None otherwise.

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

Returns true if self is of variant Game.

pub fn expect_game(self) -> Game where
    Self: Debug
[src]

Unwraps the value, yielding the content of Game.

Panics

Panics if the value is not Game, with a panic message including the content of self.

pub fn game(self) -> Option<Game>[src]

Returns Some if self is of variant Game, and None otherwise.

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

Returns true if self is of variant Gif.

pub fn expect_gif(self) -> Gif where
    Self: Debug
[src]

Unwraps the value, yielding the content of Gif.

Panics

Panics if the value is not Gif, with a panic message including the content of self.

pub fn gif(self) -> Option<Gif>[src]

Returns Some if self is of variant Gif, and None otherwise.

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

Returns true if self is of variant Location.

pub fn expect_location(self) -> Location where
    Self: Debug
[src]

Unwraps the value, yielding the content of Location.

Panics

Panics if the value is not Location, with a panic message including the content of self.

pub fn location(self) -> Option<Location>[src]

Returns Some if self is of variant Location, and None otherwise.

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

Returns true if self is of variant Mpeg4Gif.

pub fn expect_mpeg4_gif(self) -> Mpeg4Gif where
    Self: Debug
[src]

Unwraps the value, yielding the content of Mpeg4Gif.

Panics

Panics if the value is not Mpeg4Gif, with a panic message including the content of self.

pub fn mpeg4_gif(self) -> Option<Mpeg4Gif>[src]

Returns Some if self is of variant Mpeg4Gif, and None otherwise.

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

Returns true if self is of variant Photo.

pub fn expect_photo(self) -> Photo where
    Self: Debug
[src]

Unwraps the value, yielding the content of Photo.

Panics

Panics if the value is not Photo, with a panic message including the content of self.

pub fn photo(self) -> Option<Photo>[src]

Returns Some if self is of variant Photo, and None otherwise.

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

Returns true if self is of variant Sticker.

pub fn expect_sticker(self) -> Sticker where
    Self: Debug
[src]

Unwraps the value, yielding the content of Sticker.

Panics

Panics if the value is not Sticker, with a panic message including the content of self.

pub fn sticker(self) -> Option<Sticker>[src]

Returns Some if self is of variant Sticker, and None otherwise.

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

Returns true if self is of variant Venue.

pub fn expect_venue(self) -> Venue where
    Self: Debug
[src]

Unwraps the value, yielding the content of Venue.

Panics

Panics if the value is not Venue, with a panic message including the content of self.

pub fn venue(self) -> Option<Venue>[src]

Returns Some if self is of variant Venue, and None otherwise.

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

Returns true if self is of variant Video.

pub fn expect_video(self) -> Video where
    Self: Debug
[src]

Unwraps the value, yielding the content of Video.

Panics

Panics if the value is not Video, with a panic message including the content of self.

pub fn video(self) -> Option<Video>[src]

Returns Some if self is of variant Video, and None otherwise.

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

Returns true if self is of variant Voice.

pub fn expect_voice(self) -> Voice where
    Self: Debug
[src]

Unwraps the value, yielding the content of Voice.

Panics

Panics if the value is not Voice, with a panic message including the content of self.

pub fn voice(self) -> Option<Voice>[src]

Returns Some if self is of variant Voice, and None otherwise.

Trait Implementations

impl Clone for Kind[src]

impl Debug for Kind[src]

impl From<Article> for Kind[src]

impl From<Audio> for Kind[src]

impl From<Contact> for Kind[src]

impl From<Document> for Kind[src]

impl From<Game> for Kind[src]

impl From<Gif> for Kind[src]

impl From<Location> for Kind[src]

impl From<Mpeg4Gif> for Kind[src]

impl From<Photo> for Kind[src]

impl From<Sticker> for Kind[src]

impl From<Venue> for Kind[src]

impl From<Video> for Kind[src]

impl From<Voice> for Kind[src]

impl PartialEq<Kind> for Kind[src]

impl Serialize for Kind[src]

impl StructuralPartialEq for Kind[src]

Auto Trait Implementations

impl RefUnwindSafe for Kind

impl Send for Kind

impl Sync for Kind

impl Unpin for Kind

impl UnwindSafe for Kind

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> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.