[−][src]Enum tbot::types::message::Kind
Represents kinds of messages.
Variants
Text(Text)
A text message.
Audio(Audio, Text)
An audio. The second item is the caption.
Document(Document, Text)
A document. The second item is the caption.
Game(Game)
An invitation to play a game.
Photo(Vec<PhotoSize>, Text, Option<String>)
A photo. The second item is the caption, the third one is
media_group_id
, i.e. this photo belongs to an album with this ID.
Sticker(Sticker)
A sticker.
Video(Video, Text, Option<String>)
A video. The second item is the caption, the third one is
media_group_id
, i.e. this photo belongs to an album with this ID.
Voice(Voice, Text)
A voice message. The second item is the caption.
VideoNote(VideoNote)
A video note.
Contact(Contact)
A contact.
Location(Location)
A location.
Venue(Venue)
A venue.
Animation(Animation, Text)
An animation. The second item is the caption.
Poll(Poll)
A poll.
NewChatMembers(Vec<User>)
A service message about new chat members.
LeftChatMember(User)
A service message about a member who left.
NewChatTitle(String)
A service message about the new chat title.
NewChatPhoto(Vec<PhotoSize>)
A service message about the new chat photo.
ChatPhotoDeleted
A service message that the chat photo was deleted.
GroupCreated
A service message that the group was created.
SupergroupCreated
A service message that the supergroup was created.
ChannelCreated
A service message that the channel was created.
MigrateTo(Id)
A service message that the group migrated to a supergroup with this ID.
MigrateFrom(Id)
A service message that the supergroup used to be a group with this ID.
Pinned(Box<Message>)
A service message that this message was pinned.
Invoice(Invoice)
An invoice.
SuccessfulPayment(SuccessfulPayment)
A service message about a successful payment.
ConnectedWebsite(String)
A connected website.
PassportData(Data)
Passport data.
Unknown
Some unkonwn message kind. Probably means tbot
is outdated.
Methods
impl Kind
[src]
pub fn is_text(&self) -> bool
[src]
Checks if self
is Text
.
pub fn is_audio(&self) -> bool
[src]
Checks if self
is Audio
.
pub fn is_document(&self) -> bool
[src]
Checks if self
is Document
.
pub fn is_game(&self) -> bool
[src]
Checks if self
is Game
.
pub fn is_photo(&self) -> bool
[src]
Checks if self
is Photo
.
pub fn is_sticker(&self) -> bool
[src]
Checks if self
is Sticker
.
pub fn is_video(&self) -> bool
[src]
Checks if self
is Video
.
pub fn is_voice(&self) -> bool
[src]
Checks if self
is Voice
.
pub fn is_video_note(&self) -> bool
[src]
Checks if self
is VideoNote
.
pub fn is_contact(&self) -> bool
[src]
Checks if self
is Contact
.
pub fn is_location(&self) -> bool
[src]
Checks if self
is Location
.
pub fn is_venue(&self) -> bool
[src]
Checks if self
is Venue
.
pub fn is_animation(&self) -> bool
[src]
Checks if self
is Animation
.
pub fn is_poll(&self) -> bool
[src]
Checks if self
is Poll
.
pub fn is_new_chat_members(&self) -> bool
[src]
Checks if self
is NewChatMembers
.
pub fn is_left_chat_member(&self) -> bool
[src]
Checks if self
is LeftChatMember
.
pub fn is_new_chat_title(&self) -> bool
[src]
Checks if self
is NewChatTitle
.
pub fn is_new_chat_photo(&self) -> bool
[src]
Checks if self
is NewChatPhoto
.
pub fn is_chat_photo_deleted(&self) -> bool
[src]
Checks if self
is ChatPhotoDeleted
.
pub fn is_group_created(&self) -> bool
[src]
Checks if self
is GroupCreated
.
pub fn is_supergroup_created(&self) -> bool
[src]
Checks if self
is SupergroupCreated
.
pub fn is_channel_created(&self) -> bool
[src]
Checks if self
is ChannelCreated
.
pub fn is_migrate_to(&self) -> bool
[src]
Checks if self
is MigrateTo
.
pub fn is_migrate_from(&self) -> bool
[src]
Checks if self
is MigrateFrom
.
pub fn is_pinned(&self) -> bool
[src]
Checks if self
is Pinned
.
pub fn is_invoice(&self) -> bool
[src]
Checks if self
is Invoice
.
pub fn is_successful_payment(&self) -> bool
[src]
Checks if self
is SuccessfulPayment
.
pub fn is_connected_website(&self) -> bool
[src]
Checks if self
is ConnectedWebsite
.
pub fn is_passport_data(&self) -> bool
[src]
Checks if self
is PassportData
.
Trait Implementations
impl PartialEq<Kind> for Kind
[src]
impl Clone for Kind
[src]
fn clone(&self) -> Kind
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Kind
[src]
Auto Trait Implementations
impl Sync for Kind
impl Send for Kind
impl Unpin for Kind
impl RefUnwindSafe for Kind
impl UnwindSafe for Kind
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,