pub struct Cursor<'a> { /* private fields */ }Expand description
Reference to an element in a document.
Implementations§
Source§impl<'a> Cursor<'a>
impl<'a> Cursor<'a>
pub fn insert_tag<'b>(self, tag_name: &'b str) -> Result<Cursor<'a>, ParseError>
pub fn append_tag<'b>(self, tag_name: &'b str) -> Result<Cursor<'a>, ParseError>
pub fn prepend_tag<'b>( self, tag_name: &'b str, ) -> Result<Cursor<'a>, ParseError>
pub fn insert_attribute<'b>( &self, name: &'b str, value: &'b str, ) -> Result<Cursor<'a>, ParseError>
pub fn set_attribute<'b>( &self, name: &'b str, value: Option<&'b str>, ) -> Result<Cursor<'a>, ParseError>
pub fn insert_cdata<'b>(self, cdata: &'b str) -> Result<Cursor<'a>, ParseError>
pub fn append_cdata<'b>(self, cdata: &'b str) -> Result<Cursor<'a>, ParseError>
pub fn prepend_cdata<'b>(self, cdata: &'b str) -> Result<Cursor<'a>, ParseError>
pub fn remove(self)
pub fn next(self) -> Cursor<'a>
pub fn next_tag(self) -> Cursor<'a>
pub fn previous(self) -> Cursor<'a>
pub fn previous_tag(self) -> Cursor<'a>
pub fn parent(self) -> Cursor<'a>
pub fn root(self) -> Cursor<'a>
pub fn first_child(self) -> Cursor<'a>
pub fn last_child(self) -> Cursor<'a>
pub fn first_tag(self) -> Cursor<'a>
pub fn find_tag(self, name: &str) -> Cursor<'a>
pub fn find_tag_with_attribute(self, attribute_name: &str) -> Cursor<'a>
pub fn find_tag_with_attribute_value( self, attribute_name: &str, value: &str, ) -> Cursor<'a>
pub fn children(self) -> Children<'a> ⓘ
pub fn attributes(self) -> Attributes<'a> ⓘ
pub fn following_sibling(self) -> FollowingSibling<'a> ⓘ
pub fn descendant_or_self(self) -> DescendantOrSelf<'a> ⓘ
pub fn ancestor(self) -> Ancestor<'a> ⓘ
pub fn preceding_sibling(self) -> PrecedingSibling<'a> ⓘ
pub fn is_null(&self) -> bool
pub fn is_tag(&self) -> bool
pub fn has_children(&self) -> bool
pub fn name(&self) -> &str
pub fn attribute(&self, name: &str) -> Option<&str>
pub fn cdata(&self) -> &str
pub fn str_size(&self) -> usize
pub fn insert_document<'b>( self, cursor: Cursor<'b>, ) -> Result<Cursor<'a>, ParseError>
pub fn to_document(&self) -> Result<Document, ParseError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Cursor<'a>
impl<'a> RefUnwindSafe for Cursor<'a>
impl<'a> !Send for Cursor<'a>
impl<'a> !Sync for Cursor<'a>
impl<'a> Unpin for Cursor<'a>
impl<'a> UnwindSafe for Cursor<'a>
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