pub struct TextNode {
pub raw: String,
pub range: Option<(usize, usize)>,
/* private fields */
}Fields§
§raw: String§range: Option<(usize, usize)>Implementations§
Source§impl TextNode
impl TextNode
pub fn new(raw: String) -> Self
pub fn with_range(raw: String, start: usize, end: usize) -> Self
pub fn range(&self) -> Option<(usize, usize)>
pub fn set_raw(&mut self, v: String)
pub fn trimmed_raw_text(&mut self) -> &str
pub fn trimmed_text(&mut self) -> &str
pub fn is_whitespace(&self) -> bool
pub fn text(&self) -> String
pub fn raw_text(&self) -> &str
pub fn decoded_text(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextNode
impl RefUnwindSafe for TextNode
impl Send for TextNode
impl Sync for TextNode
impl Unpin for TextNode
impl UnwindSafe for TextNode
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more