Struct wikitext_parser::Text
source · pub struct Text {
pub pieces: Vec<TextPiece>,
}
Expand description
The text content of a section.
Fields§
§pieces: Vec<TextPiece>
The pieces of the text.
Implementations§
source§impl Text
impl Text
sourcepub fn extend_with_text(&mut self, text: &str)
pub fn extend_with_text(&mut self, text: &str)
Extend the current last text piece with the given string,
or append a new text piece created from the given string if there is no text piece
or the last text piece is not of variant Text
or FormattedText
.
sourcepub fn trim_self_start(&mut self)
pub fn trim_self_start(&mut self)
Trim whitespace from the beginning of the text.
sourcepub fn trim_self_end(&mut self)
pub fn trim_self_end(&mut self)
Trim whitespace from the end of the text.
Trait Implementations§
source§impl PartialEq<Text> for Text
impl PartialEq<Text> for Text
impl Eq for Text
impl StructuralEq for Text
impl StructuralPartialEq for Text
Auto Trait Implementations§
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
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