Struct kuchiki::NodeDataRef
[−]
[src]
pub struct NodeDataRef<T> { /* fields omitted */ }
Holds a strong reference to a node, but dereferences to some component inside of it.
Methods
impl<T> NodeDataRef<T>
[src]
fn new<F>(rc: NodeRef, f: F) -> NodeDataRef<T> where F: FnOnce(&Node) -> &T
Create a NodeDataRef
for a component in a given node.
fn new_opt<F>(rc: NodeRef, f: F) -> Option<NodeDataRef<T>> where F: FnOnce(&Node) -> Option<&T>
Create a NodeDataRef
for and a component that may or may not be in a given node.
fn as_node(&self) -> &NodeRef
Access the corresponding node.
impl NodeDataRef<ElementData>
[src]
fn text_contents(&self) -> String
Return the concatenation of all text nodes in this subtree.
Trait Implementations
impl<T> Deref for NodeDataRef<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T: Debug> Debug for NodeDataRef<T>
[src]
impl Element for NodeDataRef<ElementData>
[src]
fn parent_element(&self) -> Option<Self>
fn first_child_element(&self) -> Option<Self>
fn last_child_element(&self) -> Option<Self>
fn prev_sibling_element(&self) -> Option<Self>
fn next_sibling_element(&self) -> Option<Self>
fn is_empty(&self) -> bool
Returns whether this element matches :empty
. Read more
fn is_root(&self) -> bool
Returns whether this element matches :root
, i.e. whether it is the root element of a document. Read more
fn is_html_element_in_html_document(&self) -> bool
fn get_local_name<'a>(&'a self) -> &'a LocalName
fn get_namespace<'a>(&'a self) -> &'a Namespace
fn get_id(&self) -> Option<LocalName>
fn has_class(&self, name: &LocalName) -> bool
fn each_class<F>(&self, callback: F) where F: FnMut(&LocalName)
fn match_non_ts_pseudo_class(&self, pseudo: PseudoClass) -> bool
fn insert_flags(&self, _flags: ElementFlags)
Add flags to the element. See the ElementFlags
docs for details. Read more
fn clear_flags(&self)
Clears the relevant ElementFlags. This is not called from rust-selectors, but provided as part of the Element interface since it makes sense. Read more