Enum wikitext_parser::TextPiece
source · pub enum TextPiece {
Text(String),
DoubleBraceExpression {
tag: String,
attributes: Vec<Attribute>,
},
InternalLink {
target: String,
options: Vec<String>,
label: Option<Text>,
},
FormattedText {
formatting: TextFormatting,
text: Text,
},
ListItem {
list_prefix: String,
text: Text,
},
}
Expand description
A piece of text of a section of wikitext.
Variants§
Text(String)
A plain string.
DoubleBraceExpression
Fields
A double brace expression.
InternalLink
Fields
An internal link.
FormattedText
A piece of text that is formatted in e.g. bold or italics.
ListItem
Fields
A list item.
Trait Implementations§
source§impl PartialEq<TextPiece> for TextPiece
impl PartialEq<TextPiece> for TextPiece
impl Eq for TextPiece
impl StructuralEq for TextPiece
impl StructuralPartialEq for TextPiece
Auto Trait Implementations§
impl RefUnwindSafe for TextPiece
impl Send for TextPiece
impl Sync for TextPiece
impl Unpin for TextPiece
impl UnwindSafe for TextPiece
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