Enum wikitext_parser::TextPiece
source · pub enum TextPiece {
Text {
formatting: TextFormatting,
text: String,
},
DoubleBraceExpression {
tag: Text,
attributes: Vec<Attribute>,
},
InternalLink {
target: Text,
options: Vec<String>,
label: Option<Text>,
},
ListItem {
list_prefix: String,
text: Text,
},
}
Expand description
A piece of text of a section of wikitext.
Variants§
Text
Plain text to be rendered as is, with the given formatting.
DoubleBraceExpression
Fields
A double brace expression.
InternalLink
Fields
An internal link.
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