pub struct Text<'a> { /* private fields */ }
Expand description
Represents input text.
Implementations§
Source§impl<'a> Text<'a>
impl<'a> Text<'a>
Sourcepub const fn with_plain(text: &'a str) -> Self
pub const fn with_plain(text: &'a str) -> Self
Consructs new Text
without any parse mode.
Sourcepub fn with_markdown(text: &'a str) -> Self
pub fn with_markdown(text: &'a str) -> Self
Constructs new Text
with Markdown
parse mode.
Sourcepub fn with_markdown_v2(text: &'a str) -> Self
pub fn with_markdown_v2(text: &'a str) -> Self
Constructs new Text
with MarkdownV2
parse mode.
Sourcepub fn is_markdown_v2(self) -> bool
pub fn is_markdown_v2(self) -> bool
Checks if parse mode is MarkdownV2
.
Sourcepub fn is_markdown(self) -> bool
pub fn is_markdown(self) -> bool
Checks if parse mode is Markdown
.
Trait Implementations§
impl<'a> Copy for Text<'a>
impl<'a> Eq for Text<'a>
impl<'a> StructuralPartialEq for Text<'a>
Auto Trait Implementations§
impl<'a> Freeze for Text<'a>
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.