pub struct SendMessage { /* private fields */ }Expand description
Builder for the sendMessage method.
Implementations§
Source§impl SendMessage
impl SendMessage
Sourcepub fn business_connection_id(self, id: impl Into<String>) -> Self
pub fn business_connection_id(self, id: impl Into<String>) -> Self
Business connection ID for sending on behalf of a business account.
Sourcepub fn message_thread_id(self, id: i64) -> Self
pub fn message_thread_id(self, id: i64) -> Self
Forum topic thread ID.
Sourcepub fn parse_mode(self, mode: ParseMode) -> Self
pub fn parse_mode(self, mode: ParseMode) -> Self
Sets the text parse mode (MarkdownV2, HTML, or Markdown).
Sourcepub fn entities(self, entities: Vec<MessageEntity>) -> Self
pub fn entities(self, entities: Vec<MessageEntity>) -> Self
Sets custom message entities instead of using a parse mode.
Sourcepub fn link_preview_options(self, opts: LinkPreviewOptions) -> Self
pub fn link_preview_options(self, opts: LinkPreviewOptions) -> Self
Configures link preview generation options.
Sourcepub fn disable_notification(self, v: bool) -> Self
pub fn disable_notification(self, v: bool) -> Self
Sends the message silently — the recipient receives no notification sound.
Sourcepub fn protect_content(self, v: bool) -> Self
pub fn protect_content(self, v: bool) -> Self
Protects the message from being forwarded or saved.
Sourcepub fn allow_paid_broadcast(self, v: bool) -> Self
pub fn allow_paid_broadcast(self, v: bool) -> Self
Allows sending to large audiences at the cost of Telegram Stars.
Sourcepub fn message_effect_id(self, id: impl Into<String>) -> Self
pub fn message_effect_id(self, id: impl Into<String>) -> Self
Attaches a message effect (animated emoji reaction) to the message.
Sourcepub fn reply_parameters(self, rp: ReplyParameters) -> Self
pub fn reply_parameters(self, rp: ReplyParameters) -> Self
Reply parameters for this message.
Sourcepub fn reply_to(self, message_id: i64) -> Self
pub fn reply_to(self, message_id: i64) -> Self
Convenience shortcut for reply_parameters — sets the reply-to message ID.
Sourcepub fn reply_markup(self, markup: impl Into<ReplyMarkup>) -> Self
pub fn reply_markup(self, markup: impl Into<ReplyMarkup>) -> Self
Attaches a reply markup (inline keyboard, reply keyboard, etc.).
Trait Implementations§
Source§impl IntoFuture for SendMessage
impl IntoFuture for SendMessage
Source§type IntoFuture = Pin<Box<dyn Future<Output = <SendMessage as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SendMessage as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl Freeze for SendMessage
impl !RefUnwindSafe for SendMessage
impl Send for SendMessage
impl Sync for SendMessage
impl Unpin for SendMessage
impl UnsafeUnpin for SendMessage
impl !UnwindSafe for SendMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more