pub struct XmlText { /* private fields */ }Expand description
XML text content.
Implementations§
Source§impl XmlText
impl XmlText
Sourcepub fn from_chars(text: Vec<char>) -> Self
pub fn from_chars(text: Vec<char>) -> Self
Creates a new text node from a character array.
Sourcepub fn from_char_slice(text: &[char], start: usize, length: usize) -> Self
pub fn from_char_slice(text: &[char], start: usize, length: usize) -> Self
Creates a new text node from a slice of characters.
Sourcepub fn content_equals(&self, other: &XmlText) -> bool
pub fn content_equals(&self, other: &XmlText) -> bool
Tests content equality using MD5 hash comparison.
Sourcepub fn set_text(&mut self, text: Vec<char>)
pub fn set_text(&mut self, text: Vec<char>)
Sets the text content.
Note: This recalculates the hash and info size.
Sourcepub fn content_hash(&self) -> i32
pub fn content_hash(&self) -> i32
Returns a 32-bit hash code for this text node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XmlText
impl RefUnwindSafe for XmlText
impl Send for XmlText
impl Sync for XmlText
impl Unpin for XmlText
impl UnwindSafe for XmlText
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