pub struct Node {
pub tag: String,
pub attrs: Attrs,
pub content: Option<NodeContent>,
}Fields§
§tag: String§attrs: Attrs§content: Option<NodeContent>Implementations§
Source§impl Node
impl Node
pub fn new(tag: &str, attrs: Attrs, content: Option<NodeContent>) -> Self
pub fn children(&self) -> Option<&[Node]>
pub fn attrs(&self) -> AttrParser<'_>
pub fn get_optional_child_by_tag<'a>( &'a self, tags: &[&str], ) -> Option<&'a Node>
pub fn get_children_by_tag(&self, tag: &str) -> Vec<&Node>
pub fn get_optional_child(&self, tag: &str) -> Option<&Node>
Trait Implementations§
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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