tbot::contexts

Struct EditedText

Source
#[non_exhaustive]
pub struct EditedText { pub bot: Arc<Bot>, pub message_id: Id, pub from: Option<User>, pub date: i64, pub chat: Chat, pub reply_to: Option<Message>, pub author_signature: Option<String>, pub edit_date: i64, pub reply_markup: Option<Keyboard>, pub via_bot: Option<User>, pub text: Text, }
Expand description

The context for edited_text handlers.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§bot: Arc<Bot>

A bot for calling API without information inference.

§message_id: Id

ID of the message.

§from: Option<User>

The author of the message.

§date: i64

The timestamp of the message.

§chat: Chat

The chat to which the message was sent.

§reply_to: Option<Message>

The replied message.

§author_signature: Option<String>

The author’s signature, if enabled for the channel.

§edit_date: i64

The last time when the message was edited.

§reply_markup: Option<Keyboard>

The inline keyboard attached to the message.

§via_bot: Option<User>

The bot via which the message was sent.

§text: Text

The text of the message.

Trait Implementations§

Source§

impl AnyText for EditedText

Source§

fn text(&self) -> &Text

The text or the caption of the message.
Source§

impl Clone for EditedText

Source§

fn clone(&self) -> EditedText

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 Context for EditedText

Source§

fn bot(&self) -> &Bot

A bot for calling API without information inference.
Source§

impl Debug for EditedText

Source§

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

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

impl EditedMessage for EditedText

Source§

fn edit_date(&self) -> i64

The last time when the message was edited.
Source§

impl Forwardable for EditedText

Source§

fn forward_to<'a>( &'a self, chat_id: impl ImplicitChatId<'a>, ) -> ForwardMessage<'a>

Forwards this message to another chat.
Source§

impl MediaMessage for EditedText

Source§

fn reply_to(&self) -> Option<&Message>

The replied message.
Source§

fn author_signature(&self) -> Option<&str>

The author’s signature, if enabled for the channel.
Source§

fn reply_markup(&self) -> Option<&Keyboard>

The inline keyboard attached to the message.
Source§

fn via_bot(&self) -> Option<&User>

The bot via which the message was sent.
Source§

impl Message for EditedText

Source§

fn message_id(&self) -> Id

ID of the message.
Source§

fn from(&self) -> Option<&User>

The author of the message.
Source§

fn date(&self) -> i64

The timestamp of the message.
Source§

fn chat(&self) -> &Chat

The chat to which the message was sent.
Source§

impl Pinnable for EditedText

Source§

fn pin_this_message(&self) -> PinChatMessage<'_>

Pins this message.
Source§

impl Text for EditedText

Source§

fn text(&self) -> &Text

The text of the message.

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> ChatActionLoop for T
where T: Message,

Source§

fn send_chat_action_in_loop( &self, action: Action, ) -> BoxFuture<'_, Result<Infallible, MethodCall>>

Sends a chat action in an infinite loop, returning only if failed to send the action. Read more
Source§

impl<T> ChatMethods for T
where T: Message,

Source§

fn delete_chat_photo(&self) -> DeleteChatPhoto<'_>

Deletes the photo of this chat.
Source§

fn delete_chat_sticker_set(&self) -> DeleteChatStickerSet<'_>

Deletes the sticker set of this chat.
Source§

fn delete_message(&self, message_id: Id) -> DeleteMessage<'_>

Deletes a message in this chat.
Source§

fn delete_this_message(&self) -> DeleteMessage<'_>

Deletes the incoming message.
Source§

fn edit_message_caption<'a>( &'a self, message_id: Id, caption: impl Into<Text<'a>>, ) -> EditMessageCaption<'a>

Updates the caption of a message in this group.
Source§

fn edit_message_location( &self, message_id: Id, location: (f64, f64), ) -> EditMessageLocation<'_>

Updates a live location in this group.
Source§

fn edit_message_media<'a>( &'a self, message_id: Id, media: impl Into<EditableMedia<'a>>, ) -> EditMessageMedia<'a>

Updates the media of a message in this group.
Source§

fn edit_message_reply_markup<'a>( &'a self, message_id: Id, reply_markup: Keyboard<'a>, ) -> EditMessageReplyMarkup<'a>

Updates the reply markup of a message in this group.
Source§

fn edit_message_text<'a>( &'a self, message_id: Id, text: impl Into<Text<'a>>, ) -> EditMessageText<'a>

Updates the text of a message in this group.
Exports the invite link of this chat.
Source§

fn forward_here<'a>( &'a self, from_chat_id: impl ImplicitChatId<'a>, message_id: Id, ) -> ForwardMessage<'a>

Forwards a message to this chat.
Source§

fn get_chat(&self) -> GetChat<'_>

Gets information about this chat.
Source§

fn get_chat_administrators(&self) -> GetChatAdministrators<'_>

Gets a list of admins of this chat.
Source§

fn get_chat_member(&self, user_id: Id) -> GetChatMember<'_>

Gets information about a member of this chat.
Source§

fn get_chat_members_count(&self) -> GetChatMembersCount<'_>

Gets the number of members in this chat.
Source§

fn get_message_game_high_scores( &self, message_id: Id, user_id: Id, ) -> GetMessageGameHighScores<'_>

Gets infomation about high scores in a game sent in this chat.
Source§

fn kick_chat_member(&self, user_id: Id) -> KickChatMember<'_>

Kicks a member of this chat.
Source§

fn leave_chat(&self) -> LeaveChat<'_>

Leaves this chat.
Source§

fn pin_chat_message(&self, message_id: Id) -> PinChatMessage<'_>

Pins a message in this chat.
Source§

fn promote_chat_member(&self, user_id: Id) -> PromoteChatMember<'_>

Promotes a member of this chat.
Source§

fn restrict_chat_member( &self, user_id: Id, permissions: Permissions, ) -> RestrictChatMember<'_>

Restricts a member of this chat.
Source§

fn send_animation<'a>(&'a self, animation: Animation<'a>) -> SendAnimation<'a>

Send an animation to this chat.
Source§

fn send_animation_in_reply<'a>( &'a self, animation: Animation<'a>, ) -> SendAnimation<'a>

Sends an animation in reply to this message.
Source§

fn send_audio<'a>(&'a self, audio: Audio<'a>) -> SendAudio<'a>

Sends an audio to this chat.
Source§

fn send_audio_in_reply<'a>(&'a self, audio: Audio<'a>) -> SendAudio<'a>

Sends an audio in reply to this message.
Source§

fn send_chat_action(&self, action: Action) -> SendChatAction<'_>

Sends an action to this group.
Source§

fn send_contact<'a>( &'a self, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a>

Sends a contact to this group.
Source§

fn send_contact_in_reply<'a>( &'a self, phone_number: &'a str, first_name: &'a str, ) -> SendContact<'a>

Sends a contact in reply to this message.
Source§

fn send_game<'a>(&'a self, game_short_name: &'a str) -> SendGame<'a>

Sends a game to this chat.
Source§

fn send_game_in_reply<'a>(&'a self, game_short_name: &'a str) -> SendGame<'a>

Sends a game in reply to this message.
Source§

fn send_dice(&self) -> SendDice<'_>

Sends a dice to this chat.
Source§

fn send_dice_in_reply(&self) -> SendDice<'_>

Sends a dice in reply to this message.
Source§

fn send_document<'a>(&'a self, document: Document<'a>) -> SendDocument<'a>

Sends a document to this chat.
Source§

fn send_document_in_reply<'a>( &'a self, document: Document<'a>, ) -> SendDocument<'a>

Sends a document in reply to this message.
Source§

fn send_invoice<'a>( &'a self, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a>

Sends an invoice to this chat.
Source§

fn send_invoice_in_reply<'a>( &'a self, title: &'a str, description: &'a str, payload: &'a str, provider_token: &'a str, start_parameter: &'a str, currency: &'a str, prices: &'a [LabeledPrice<'a>], ) -> SendInvoice<'a>

Sends an invoice in reply to this message.
Source§

fn send_location(&self, location: (f64, f64)) -> SendLocation<'_>

Sends a location to this chat.
Source§

fn send_location_in_reply(&self, location: (f64, f64)) -> SendLocation<'_>

Sends a location in reply to this message.
Source§

fn send_media_group<'a>( &'a self, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a>

Sends an album to this chat.
Source§

fn send_media_group_in_reply<'a>( &'a self, media: &'a [GroupMedia<'a>], ) -> SendMediaGroup<'a>

Sends an album in reply to this message.
Source§

fn send_message<'a>(&'a self, text: impl Into<Text<'a>>) -> SendMessage<'a>

Sends a message to this chat.
Source§

fn send_message_in_reply<'a>( &'a self, text: impl Into<Text<'a>>, ) -> SendMessage<'a>

Sends a message in reply to this message.
Source§

fn send_photo<'a>(&'a self, photo: Photo<'a>) -> SendPhoto<'a>

Sends a photo to this chat.
Source§

fn send_photo_in_reply<'a>(&'a self, photo: Photo<'a>) -> SendPhoto<'a>

Sends a photo in reply to this message.
Source§

fn send_poll<'a>(&'a self, poll: &'a Any<'a>) -> SendPoll<'a>

Sends a poll to this chat.
Source§

fn send_poll_in_reply<'a>(&'a self, poll: &'a Any<'a>) -> SendPoll<'a>

Sends a poll in reply to this message.
Source§

fn send_sticker<'a>(&'a self, sticker: Sticker<'a>) -> SendSticker<'a>

Sends a sticker to this chat.
Source§

fn send_sticker_in_reply<'a>(&'a self, sticker: Sticker<'a>) -> SendSticker<'a>

Sends a sticker in reply to this message.
Source§

fn send_venue<'a>( &'a self, location: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a>

Sends a venue to this chat.
Source§

fn send_venue_in_reply<'a>( &'a self, location: (f64, f64), title: &'a str, address: &'a str, ) -> SendVenue<'a>

Sends a venue in reply to this message.
Source§

fn send_video<'a>(&'a self, video: Video<'a>) -> SendVideo<'a>

Sends a video to this chat.
Source§

fn send_video_in_reply<'a>(&'a self, video: Video<'a>) -> SendVideo<'a>

Sends a video in reply to this message.
Source§

fn send_video_note<'a>(&'a self, video_note: VideoNote<'a>) -> SendVideoNote<'a>

Sends a video note to this chat.
Source§

fn send_video_note_in_reply<'a>( &'a self, video_note: VideoNote<'a>, ) -> SendVideoNote<'a>

Sends a video note in reply to this message.
Source§

fn send_voice<'a>(&'a self, voice: Voice<'a>) -> SendVoice<'a>

Sends a voice to this chat.
Source§

fn send_voice_in_reply<'a>(&'a self, voice: Voice<'a>) -> SendVoice<'a>

Sends a voice in reply to this message.
Source§

fn set_chat_administrator_custom_title<'a>( &'a self, user_id: Id, custom_title: &'a str, ) -> SetChatAdministratorCustomTitle<'a>

Sets a custom title for an admin in this chat.
Source§

fn set_chat_description<'a>( &'a self, description: &'a str, ) -> SetChatDescription<'a>

Sets a new description of this chat.
Source§

fn set_chat_permissions( &self, permissions: Permissions, ) -> SetChatPermissions<'_>

Sets new permissions of this chat.
Source§

fn set_chat_photo<'a>(&'a self, photo: ChatPhoto<'a>) -> SetChatPhoto<'a>

Sets a new photo of this chat.
Source§

fn set_chat_sticker_set<'a>( &'a self, sticker_set_name: &'a str, ) -> SetChatStickerSet<'a>

Sets a new sticker set of this chat.
Source§

fn set_chat_title<'a>(&'a self, title: &'a str) -> SetChatTitle<'a>

Sets a new chat title of this chat.
Source§

fn set_message_game_score( &self, message_id: Id, user_id: Id, score: u32, ) -> SetMessageGameScore<'_>

Sets a new high score for a player who played a game in this chat.
Source§

fn unban_chat_member(&self, user_id: Id) -> UnbanChatMember<'_>

Unbans a member of this chat.
Source§

fn unpin_chat_message(&self) -> UnpinChatMessage<'_>

Unpins the pinned message in this chat.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more