[][src]Struct telexide::api::types::SendMessage

pub struct SendMessage {
    pub chat_id: i64,
    pub text: String,
    pub parse_mode: Option<ParseMode>,
    pub disable_web_page_preview: bool,
    pub disable_notification: bool,
    pub reply_to_message_id: Option<i64>,
    pub reply_markup: Option<ReplyMarkup>,
}

struct for holding data needed to call send_message

Fields

chat_id: i64

Unique identifier for the target chat

text: String

Text of the message to be sen, 1-4096 characters after entities parsing

parse_mode: Option<ParseMode>

Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.

disable_web_page_preview: bool

Disables link previews for links in this message

disable_notification: bool

Sends the message silently. Users will receive a notification with no sound.

reply_to_message_id: Option<i64>

If the message is a reply, ID of the original message

reply_markup: Option<ReplyMarkup>

Additional interface options.

Methods

impl SendMessage[src]

pub fn new(chat_id: i64, text: &str) -> Self[src]

pub fn set_parse_mode(&mut self, mode: &ParseMode) -> &mut Self[src]

pub fn reply_to_message(&mut self, message: &Message) -> &mut Self[src]

pub fn set_reply_to_message_id(&mut self, id: i64) -> &mut Self[src]

pub fn set_reply_markup(&mut self, markup: &ReplyMarkup) -> &mut Self[src]

pub fn toggle_disable_notification(&mut self) -> &mut Self[src]

pub fn toggle_disable_web_page_preview(&mut self) -> &mut Self[src]

Trait Implementations

impl Clone for SendMessage[src]

impl Debug for SendMessage[src]

impl<'de> Deserialize<'de> for SendMessage[src]

impl PartialEq<SendMessage> for SendMessage[src]

impl Serialize for SendMessage[src]

impl StructuralPartialEq for SendMessage[src]

Auto Trait Implementations

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> CloneAny for T where
    T: Clone + Any
[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

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

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.

impl<T> UnsafeAny for T where
    T: Any