pub enum Node {
Root(Handle),
DocType(WeakHandle),
Element(WeakHandle),
Attribute(Attribute),
Text(WeakHandle),
Comment(WeakHandle),
ProcessingInstruction(WeakHandle),
Namespace(WeakHandle),
}
Variants§
Root(Handle)
DocType(WeakHandle)
Element(WeakHandle)
Attribute(Attribute)
Text(WeakHandle)
Comment(WeakHandle)
ProcessingInstruction(WeakHandle)
Namespace(WeakHandle)
Implementations§
Source§impl Node
impl Node
pub fn enum_name(&self) -> String
pub fn is_root(&self) -> bool
pub fn is_namespace(&self) -> bool
pub fn is_element(&self) -> bool
pub fn is_attribute(&self) -> bool
pub fn is_text(&self) -> bool
pub fn is_comment(&self) -> bool
pub fn is_processing_instruction(&self) -> bool
pub fn value(&self) -> Result<Value>
pub fn as_simple_html(&self) -> Option<String>
pub fn attribute(&self) -> Option<&Attribute>
pub fn parent(&self) -> Option<Node>
pub fn children(&self) -> Vec<Node>
pub fn name(&self) -> Option<QualName>
pub fn target(&self) -> Option<String>
pub fn prefix(&self) -> String
pub fn inner_weak(&self) -> Option<&WeakNodeHandle>
pub fn evaluate_from<S: Into<String>>( &self, search: S, doc: &Document, ) -> Result<Value>
Trait Implementations§
Source§impl From<&Rc<Node>> for Node
impl From<&Rc<Node>> for Node
Source§fn from(handle: &NodeHandle) -> Self
fn from(handle: &NodeHandle) -> Self
Converts to this type from the input type.
Source§impl From<Rc<Node>> for Node
impl From<Rc<Node>> for Node
Source§fn from(handle: NodeHandle) -> Self
fn from(handle: NodeHandle) -> Self
Converts to this type from the input type.
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