pub struct InputRichMessage {
pub html: Option<String>,
pub markdown: Option<String>,
pub blocks: Option<Vec<InputRichBlock>>,
pub media: Option<Vec<InputRichMessageMedia>>,
pub is_rtl: Option<bool>,
pub skip_entity_detection: Option<bool>,
}Expand description
Describes a rich message to be sent.
Exactly one of html, markdown, or blocks must be set.
Fields§
§html: Option<String>Rich message content encoded as HTML.
Mutually exclusive with markdown and blocks.
Use media to specify the media used in the message.
markdown: Option<String>Rich message content encoded as Markdown.
Mutually exclusive with html and blocks.
Use media to specify the media used in the message.
blocks: Option<Vec<InputRichBlock>>Content of the rich message described as a list of blocks.
media: Option<Vec<InputRichMessageMedia>>Media referenced from html or markdown
via tg://photo?id=, tg://video?id=, and tg://audio?id= links.
is_rtl: Option<bool>Pass true to render the message right-to-left.
skip_entity_detection: Option<bool>Pass true to disable automatic entity detection (URLs, mentions, etc.).
Implementations§
Source§impl InputRichMessage
impl InputRichMessage
Sourcepub fn from_html(html: impl Into<String>) -> Self
pub fn from_html(html: impl Into<String>) -> Self
Creates an InputRichMessage from an HTML string.
Sourcepub fn from_markdown(markdown: impl Into<String>) -> Self
pub fn from_markdown(markdown: impl Into<String>) -> Self
Creates an InputRichMessage from a Markdown string.
Sourcepub fn from_blocks(blocks: Vec<InputRichBlock>) -> Self
pub fn from_blocks(blocks: Vec<InputRichBlock>) -> Self
Creates an InputRichMessage from a list of explicit blocks.
Sourcepub fn media(self, media: Vec<InputRichMessageMedia>) -> Self
pub fn media(self, media: Vec<InputRichMessageMedia>) -> Self
Sourcepub fn skip_entity_detection(self, v: bool) -> Self
pub fn skip_entity_detection(self, v: bool) -> Self
Disables automatic entity detection.
Trait Implementations§
Source§impl Clone for InputRichMessage
impl Clone for InputRichMessage
Source§fn clone(&self) -> InputRichMessage
fn clone(&self) -> InputRichMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more