pub enum ParseMode {
Html,
Markdown,
MarkdownV2,
}
Expand description
Represents a mode for parsing entities in a text.
See formatting options for more details.
Variants§
Implementations§
source§impl ParseMode
impl ParseMode
sourcepub fn escape<T>(self, input: T) -> String
pub fn escape<T>(self, input: T) -> String
Escapes HTML or Markdown special characters.
§Arguments
input
- String that will be escaped.
For MarkdownV2 you must escape characters with \
by yourself in the following cases:
- all ` and
\
characters in ‘pre’ and ‘code’. (...)
- part of inline link definition, all)
and\
characters.
In all other places use this method to escape special characters.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ParseMode
impl<'de> Deserialize<'de> for ParseMode
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 Ord for ParseMode
impl Ord for ParseMode
source§impl PartialEq for ParseMode
impl PartialEq for ParseMode
source§impl PartialOrd for ParseMode
impl PartialOrd for ParseMode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ParseMode
impl Eq for ParseMode
impl StructuralPartialEq for ParseMode
Auto Trait Implementations§
impl Freeze for ParseMode
impl RefUnwindSafe for ParseMode
impl Send for ParseMode
impl Sync for ParseMode
impl Unpin for ParseMode
impl UnwindSafe for ParseMode
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.