pub struct InputRichMessage {
pub blocks: Option<Vec<InputRichBlock>>,
pub html: Option<String>,
pub markdown: Option<String>,
pub media: 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; use the
constructors to guarantee this.
Fields§
§blocks: Option<Vec<InputRichBlock>>Optional. Content described as a list of blocks.
html: Option<String>Optional. Content described using Rich HTML formatting.
markdown: Option<String>Optional. Content described using Rich Markdown formatting.
media: Vec<InputRichMessageMedia>Optional. Media referenced from html/markdown via tg://photo?id=,
tg://video?id=, tg://document?id= or tg://audio?id= links.
is_rtl: Option<bool>Optional. Show the message right-to-left.
skip_entity_detection: Option<bool>Optional. Skip automatic detection of URLs, mentions, hashtags, etc.
Implementations§
Source§impl InputRichMessage
impl InputRichMessage
Sourcepub fn blocks(blocks: Vec<InputRichBlock>) -> Self
pub fn blocks(blocks: Vec<InputRichBlock>) -> Self
Creates a message from explicit blocks.
Sourcepub fn with_media(self, media: InputRichMessageMedia) -> Self
pub fn with_media(self, media: InputRichMessageMedia) -> Self
Adds an explicitly specified media element (HTML/Markdown modes only).
Sourcepub fn with_skip_entity_detection(self, skip: bool) -> Self
pub fn with_skip_entity_detection(self, skip: bool) -> Self
Sets skip_entity_detection.
Trait Implementations§
Source§impl Clone for InputRichMessage
impl Clone for InputRichMessage
Source§impl Debug for InputRichMessage
impl Debug for InputRichMessage
Source§impl<'de> Deserialize<'de> for InputRichMessage
impl<'de> Deserialize<'de> for InputRichMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InputRichMessage
impl PartialEq for InputRichMessage
Source§impl Serialize for InputRichMessage
impl Serialize for InputRichMessage
impl StructuralPartialEq for InputRichMessage
Auto Trait Implementations§
impl Forget for InputRichMessage
impl Freeze for InputRichMessage
impl Move for InputRichMessage
impl RefUnwindSafe for InputRichMessage
impl Send for InputRichMessage
impl Sync for InputRichMessage
impl Unpin for InputRichMessage
impl UnsafeUnpin for InputRichMessage
impl UnwindSafe for InputRichMessage
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