pub struct InputRichMessage {
pub html: Option<String>,
pub markdown: Option<String>,
pub is_rtl: Option<bool>,
pub skip_entity_detection: Option<bool>,
}Expand description
Describes a rich message to be sent.
Exactly one of html or markdown must be set.
Fields§
§html: Option<String>Rich message content encoded as HTML.
Mutually exclusive with markdown.
markdown: Option<String>Rich message content encoded as Markdown.
Mutually exclusive with html.
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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
Auto Trait Implementations§
impl Freeze 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