pub struct NodeRef<'a> {
pub tag: Cow<'a, str>,
pub attrs: AttrsRef<'a>,
pub content: Option<Box<NodeContentRef<'a>>>,
}Fields§
§tag: Cow<'a, str>§attrs: AttrsRef<'a>§content: Option<Box<NodeContentRef<'a>>>Implementations§
Source§impl<'a> NodeRef<'a>
impl<'a> NodeRef<'a>
pub fn new( tag: Cow<'a, str>, attrs: AttrsRef<'a>, content: Option<NodeContentRef<'a>>, ) -> Self
pub fn attr_parser(&'a self) -> AttrParserRef<'a>
pub fn children(&self) -> Option<&[NodeRef<'a>]>
pub fn get_attr(&self, key: &str) -> Option<&Cow<'a, str>>
pub fn attrs_iter(&self) -> impl Iterator<Item = (&Cow<'a, str>, &Cow<'a, str>)>
pub fn get_optional_child_by_tag(&self, tags: &[&str]) -> Option<&NodeRef<'a>>
pub fn get_children_by_tag(&self, tag: &str) -> Vec<&NodeRef<'a>>
pub fn get_optional_child(&self, tag: &str) -> Option<&NodeRef<'a>>
pub fn to_owned(&self) -> Node
Trait Implementations§
impl<'a> StructuralPartialEq for NodeRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for NodeRef<'a>
impl<'a> RefUnwindSafe for NodeRef<'a>
impl<'a> Send for NodeRef<'a>
impl<'a> Sync for NodeRef<'a>
impl<'a> Unpin for NodeRef<'a>
impl<'a> UnwindSafe for NodeRef<'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