[][src]Enum rtdlib::types::TextParseMode

pub enum TextParseMode {
    HTML(TextParseModeHTML),
    Markdown(TextParseModeMarkdown),
    // some variants omitted
}

Describes the way the text should be parsed for TextEntities

Variants

The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode

The text uses Markdown-style formatting

Implementations

impl TextParseMode[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_h_t_m_l(&self) -> bool[src]

pub fn is_markdown(&self) -> bool[src]

pub fn on_h_t_m_l<F: FnOnce(&TextParseModeHTML)>(&self, fnc: F) -> &Self[src]

pub fn on_markdown<F: FnOnce(&TextParseModeMarkdown)>(&self, fnc: F) -> &Self[src]

pub fn as_h_t_m_l(&self) -> Option<&TextParseModeHTML>[src]

pub fn as_markdown(&self) -> Option<&TextParseModeMarkdown>[src]

pub fn h_t_m_l<T: AsRef<TextParseModeHTML>>(t: T) -> Self[src]

pub fn markdown<T: AsRef<TextParseModeMarkdown>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<TextParseMode> for TextParseMode[src]

impl Clone for TextParseMode[src]

impl Debug for TextParseMode[src]

impl Default for TextParseMode[src]

impl<'de> Deserialize<'de> for TextParseMode[src]

impl RObject for TextParseMode[src]

impl Serialize for TextParseMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.