pub struct SendMessageInput {
pub peer_id: Option<InputPeer>,
pub message: Option<String>,
pub reply_to_msg_id: Option<i64>,
pub random_id: Option<i64>,
pub media: Option<InputMedia>,
pub temporary_send_date: Option<i64>,
pub is_sticker: Option<bool>,
pub has_link: Option<bool>,
pub entities: Option<MessageEntities>,
pub parse_markdown: Option<bool>,
pub send_mode: Option<i32>,
pub actions: Option<MessageActions>,
}Fields§
§peer_id: Option<InputPeer>§message: Option<String>Message text or caption
reply_to_msg_id: Option<i64>Message ID of the message being replied to
random_id: Option<i64>Random ID to prevent duplicate messages
media: Option<InputMedia>Media to send
temporary_send_date: Option<i64>Date of sending (until we fix the client reordering)
is_sticker: Option<bool>Whether the message is a sticker
has_link: Option<bool>§entities: Option<MessageEntities>Entities in the message (bold, italic, mention, etc)
parse_markdown: Option<bool>Parse markdown in message text and derive entities.
send_mode: Option<i32>Special send mode for this message
actions: Option<MessageActions>Optional interactive actions (bot messages only).
Implementations§
Source§impl SendMessageInput
impl SendMessageInput
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Returns the value of message, or the default value if message is unset.
Sourcepub fn reply_to_msg_id(&self) -> i64
pub fn reply_to_msg_id(&self) -> i64
Returns the value of reply_to_msg_id, or the default value if reply_to_msg_id is unset.
Sourcepub fn random_id(&self) -> i64
pub fn random_id(&self) -> i64
Returns the value of random_id, or the default value if random_id is unset.
Sourcepub fn is_sticker(&self) -> bool
pub fn is_sticker(&self) -> bool
Returns the value of is_sticker, or the default value if is_sticker is unset.
Sourcepub fn parse_markdown(&self) -> bool
pub fn parse_markdown(&self) -> bool
Returns the value of parse_markdown, or the default value if parse_markdown is unset.
Sourcepub fn send_mode(&self) -> MessageSendMode
pub fn send_mode(&self) -> MessageSendMode
Returns the enum value of send_mode, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_send_mode(&mut self, value: MessageSendMode)
pub fn set_send_mode(&mut self, value: MessageSendMode)
Sets send_mode to the provided enum value.
Sourcepub fn temporary_send_date(&self) -> i64
pub fn temporary_send_date(&self) -> i64
Returns the value of temporary_send_date, or the default value if temporary_send_date is unset.
Trait Implementations§
Source§impl Clone for SendMessageInput
impl Clone for SendMessageInput
Source§fn clone(&self) -> SendMessageInput
fn clone(&self) -> SendMessageInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SendMessageInput
impl Debug for SendMessageInput
Source§impl Default for SendMessageInput
impl Default for SendMessageInput
Source§fn default() -> SendMessageInput
fn default() -> SendMessageInput
Source§impl<'de> Deserialize<'de> for SendMessageInput
impl<'de> Deserialize<'de> for SendMessageInput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SendMessageInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SendMessageInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Message for SendMessageInput
impl Message for SendMessageInput
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for SendMessageInput
impl PartialEq for SendMessageInput
Source§fn eq(&self, other: &SendMessageInput) -> bool
fn eq(&self, other: &SendMessageInput) -> bool
self and other values to be equal, and is used by ==.