Skip to main content

RenderMessageTextHelper

Trait RenderMessageTextHelper 

Source
pub trait RenderMessageTextHelper {
    // Required methods
    fn html_text(&self) -> Option<String>;
    fn markdown_text(&self) -> Option<String>;
    fn html_caption(&self) -> Option<String>;
    fn markdown_caption(&self) -> Option<String>;
}
Expand description

Generates HTML and Markdown representations of text and captions in a Telegram message.

Required Methods§

Source

fn html_text(&self) -> Option<String>

Returns the HTML representation of the message text, if the message contains text. This method will parse the text and any entities (such as bold, italic, links, etc.) and return the HTML-formatted string.

Source

fn markdown_text(&self) -> Option<String>

Returns the Markdown representation of the message text, if the message contains text. This method will parse the text and any entities (such as bold, italic, links, etc.) and return the Markdown-formatted string.

Source

fn html_caption(&self) -> Option<String>

Returns the HTML representation of the message caption, if the message contains caption. This method will parse the caption and any entities (such as bold, italic, links, etc.) and return the HTML-formatted string.

Source

fn markdown_caption(&self) -> Option<String>

Returns the Markdown representation of the message caption, if the message contains caption. This method will parse the caption and any entities (such as bold, italic, links, etc.) and return the Markdown-formatted string.

Implementors§