[−][src]Enum tbot::types::update::Kind
Represents different types of updates from Telegram.
Variants (Non-exhaustive)
Message(Message)
A new chat message.
EditedMessage(Message)
An edited message.
ChannelPost(Message)
A new channel post.
EditedChannelPost(Message)
An edited channel post.
InlineQuery(InlineQuery)
An inline query.
CallbackQuery(Query)
An incoming callback query.
Poll(Poll)
A new state of a poll.
PollAnswer(Answer)
A user changed their answer in a non-anonymous poll.
ChosenInlineResult(ChosenInlineResult)
A chosen inline result.
ShippingQuery(Query)
A shipping query.
PreCheckoutQuery(PreCheckoutQuery)
A pre-checkout query.
Unknown update kind.
Implementations
impl Kind
[src]
pub fn is_message(&self) -> bool
[src]
Returns true
if self
is of variant Message
.
pub fn expect_message(self) -> Message where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Message
.
Panics
Panics if the value is not Message
, with a panic message including the content of self
.
pub fn message(self) -> Option<Message>
[src]
Returns Some
if self
is of variant Message
, and None
otherwise.
pub fn is_edited_message(&self) -> bool
[src]
Returns true
if self
is of variant EditedMessage
.
pub fn expect_edited_message(self) -> Message where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of EditedMessage
.
Panics
Panics if the value is not EditedMessage
, with a panic message including the content of self
.
pub fn edited_message(self) -> Option<Message>
[src]
Returns Some
if self
is of variant EditedMessage
, and None
otherwise.
pub fn is_channel_post(&self) -> bool
[src]
Returns true
if self
is of variant ChannelPost
.
pub fn expect_channel_post(self) -> Message where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ChannelPost
.
Panics
Panics if the value is not ChannelPost
, with a panic message including the content of self
.
pub fn channel_post(self) -> Option<Message>
[src]
Returns Some
if self
is of variant ChannelPost
, and None
otherwise.
pub fn is_edited_channel_post(&self) -> bool
[src]
Returns true
if self
is of variant EditedChannelPost
.
pub fn expect_edited_channel_post(self) -> Message where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of EditedChannelPost
.
Panics
Panics if the value is not EditedChannelPost
, with a panic message including the content of self
.
pub fn edited_channel_post(self) -> Option<Message>
[src]
Returns Some
if self
is of variant EditedChannelPost
, and None
otherwise.
pub fn is_inline_query(&self) -> bool
[src]
Returns true
if self
is of variant InlineQuery
.
pub fn expect_inline_query(self) -> InlineQuery where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of InlineQuery
.
Panics
Panics if the value is not InlineQuery
, with a panic message including the content of self
.
pub fn inline_query(self) -> Option<InlineQuery>
[src]
Returns Some
if self
is of variant InlineQuery
, and None
otherwise.
pub fn is_callback_query(&self) -> bool
[src]
Returns true
if self
is of variant CallbackQuery
.
pub fn expect_callback_query(self) -> Query where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of CallbackQuery
.
Panics
Panics if the value is not CallbackQuery
, with a panic message including the content of self
.
pub fn callback_query(self) -> Option<Query>
[src]
Returns Some
if self
is of variant CallbackQuery
, and None
otherwise.
pub fn is_poll(&self) -> bool
[src]
Returns true
if self
is of variant Poll
.
pub fn expect_poll(self) -> Poll where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of Poll
.
Panics
Panics if the value is not Poll
, with a panic message including the content of self
.
pub fn poll(self) -> Option<Poll>
[src]
Returns Some
if self
is of variant Poll
, and None
otherwise.
pub fn is_poll_answer(&self) -> bool
[src]
Returns true
if self
is of variant PollAnswer
.
pub fn expect_poll_answer(self) -> Answer where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of PollAnswer
.
Panics
Panics if the value is not PollAnswer
, with a panic message including the content of self
.
pub fn poll_answer(self) -> Option<Answer>
[src]
Returns Some
if self
is of variant PollAnswer
, and None
otherwise.
pub fn is_chosen_inline_result(&self) -> bool
[src]
Returns true
if self
is of variant ChosenInlineResult
.
pub fn expect_chosen_inline_result(self) -> ChosenInlineResult where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ChosenInlineResult
.
Panics
Panics if the value is not ChosenInlineResult
, with a panic message including the content of self
.
pub fn chosen_inline_result(self) -> Option<ChosenInlineResult>
[src]
Returns Some
if self
is of variant ChosenInlineResult
, and None
otherwise.
pub fn is_shipping_query(&self) -> bool
[src]
Returns true
if self
is of variant ShippingQuery
.
pub fn expect_shipping_query(self) -> Query where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of ShippingQuery
.
Panics
Panics if the value is not ShippingQuery
, with a panic message including the content of self
.
pub fn shipping_query(self) -> Option<Query>
[src]
Returns Some
if self
is of variant ShippingQuery
, and None
otherwise.
pub fn is_pre_checkout_query(&self) -> bool
[src]
Returns true
if self
is of variant PreCheckoutQuery
.
pub fn expect_pre_checkout_query(self) -> PreCheckoutQuery where
Self: Debug,
[src]
Self: Debug,
Unwraps the value, yielding the content of PreCheckoutQuery
.
Panics
Panics if the value is not PreCheckoutQuery
, with a panic message including the content of self
.
pub fn pre_checkout_query(self) -> Option<PreCheckoutQuery>
[src]
Returns Some
if self
is of variant PreCheckoutQuery
, and None
otherwise.
pub fn is_unknown(&self) -> bool
[src]
Returns true
if self
is of variant Unknown
.
Trait Implementations
impl Clone for Kind
[src]
impl Debug for Kind
[src]
impl PartialEq<Kind> 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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,