pub struct FormattedText {
pub text: String,
pub entities: Vec<TextEntity>,
}
Expand description
A text with some entities
Fields§
§text: String
The text
entities: Vec<TextEntity>
Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code and PreCode entities can’t contain other entities. BlockQuote entities can’t contain other BlockQuote entities. Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and can be part of any other entities. All other entities can’t contain each other
Trait Implementations§
Source§impl Clone for FormattedText
impl Clone for FormattedText
Source§fn clone(&self) -> FormattedText
fn clone(&self) -> FormattedText
Returns a duplicate of the value. Read more
1.0.0 · 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 FormattedText
impl Debug for FormattedText
Source§impl Default for FormattedText
impl Default for FormattedText
Source§fn default() -> FormattedText
fn default() -> FormattedText
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FormattedText
impl<'de> Deserialize<'de> for FormattedText
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 PartialEq for FormattedText
impl PartialEq for FormattedText
Source§impl Serialize for FormattedText
impl Serialize for FormattedText
impl StructuralPartialEq for FormattedText
Auto Trait Implementations§
impl Freeze for FormattedText
impl RefUnwindSafe for FormattedText
impl Send for FormattedText
impl Sync for FormattedText
impl Unpin for FormattedText
impl UnwindSafe for FormattedText
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