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]
impl<T> NodeDataRef<T>
pub fn new<F>(rc: NodeRef, f: F) -> NodeDataRef<T> where
F: FnOnce(&Node) -> &T,
[src]
pub fn new<F>(rc: NodeRef, f: F) -> NodeDataRef<T> where
F: FnOnce(&Node) -> &T,
Create a NodeDataRef
for a component in a given node.
pub fn new_opt<F>(rc: NodeRef, f: F) -> Option<NodeDataRef<T>> where
F: FnOnce(&Node) -> Option<&T>,
[src]
pub 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.
pub fn as_node(&self) -> &NodeRef
[src]
pub fn as_node(&self) -> &NodeRef
Access the corresponding node.
impl NodeDataRef<ElementData>
[src]
impl NodeDataRef<ElementData>
pub fn text_contents(&self) -> String
[src]
pub fn text_contents(&self) -> String
Return the concatenation of all text nodes in this subtree.
Trait Implementations
impl<T: Eq> Eq for NodeDataRef<T>
[src]
impl<T: Eq> Eq for NodeDataRef<T>
impl<T> Deref for NodeDataRef<T>
[src]
impl<T> Deref for NodeDataRef<T>
type Target = T
The resulting type after dereferencing.
ⓘImportant traits for &'a mut Rfn deref(&self) -> &T
[src]
fn deref(&self) -> &T
Dereferences the value.
impl<T> PartialEq for NodeDataRef<T>
[src]
impl<T> PartialEq for NodeDataRef<T>
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T> Clone for NodeDataRef<T>
[src]
impl<T> Clone for NodeDataRef<T>
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for NodeDataRef<T>
[src]
impl<T: Debug> Debug for NodeDataRef<T>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Element for NodeDataRef<ElementData>
[src]
impl Element for NodeDataRef<ElementData>
type Impl = KuchikiSelectors
fn opaque(&self) -> OpaqueElement
[src]
fn opaque(&self) -> OpaqueElement
Converts self into an opaque representation.
fn is_html_slot_element(&self) -> bool
[src]
fn is_html_slot_element(&self) -> bool
Returns whether the element is an HTML element.
fn parent_node_is_shadow_root(&self) -> bool
[src]
fn parent_node_is_shadow_root(&self) -> bool
Whether the parent node of this element is a shadow root.
fn containing_shadow_host(&self) -> Option<Self>
[src]
fn containing_shadow_host(&self) -> Option<Self>
The host of the containing shadow root, if any.
fn parent_element(&self) -> Option<Self>
[src]
fn parent_element(&self) -> Option<Self>
fn prev_sibling_element(&self) -> Option<Self>
[src]
fn prev_sibling_element(&self) -> Option<Self>
Skips non-element nodes
fn next_sibling_element(&self) -> Option<Self>
[src]
fn next_sibling_element(&self) -> Option<Self>
Skips non-element nodes
fn is_empty(&self) -> bool
[src]
fn is_empty(&self) -> bool
Returns whether this element matches :empty
. Read more
fn is_root(&self) -> bool
[src]
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
[src]
fn is_html_element_in_html_document(&self) -> bool
fn local_name<'a>(&'a self) -> &'a LocalName
[src]
fn local_name<'a>(&'a self) -> &'a LocalName
fn namespace<'a>(&'a self) -> &'a Namespace
[src]
fn namespace<'a>(&'a self) -> &'a Namespace
Empty string for no namespace
fn is_link(&self) -> bool
[src]
fn is_link(&self) -> bool
Whether this element is a link
.
fn has_id(&self, id: &LocalName, case_sensitivity: CaseSensitivity) -> bool
[src]
fn has_id(&self, id: &LocalName, case_sensitivity: CaseSensitivity) -> bool
fn has_class(&self, name: &LocalName, case_sensitivity: CaseSensitivity) -> bool
[src]
fn has_class(&self, name: &LocalName, case_sensitivity: CaseSensitivity) -> bool
fn attr_matches(
&self,
ns: &NamespaceConstraint<&Namespace>,
local_name: &LocalName,
operation: &AttrSelectorOperation<&String>
) -> bool
[src]
fn attr_matches(
&self,
ns: &NamespaceConstraint<&Namespace>,
local_name: &LocalName,
operation: &AttrSelectorOperation<&String>
) -> bool
fn match_pseudo_element(
&self,
pseudo: &PseudoElement,
_context: &mut MatchingContext<KuchikiSelectors>
) -> bool
[src]
fn match_pseudo_element(
&self,
pseudo: &PseudoElement,
_context: &mut MatchingContext<KuchikiSelectors>
) -> bool
fn match_non_ts_pseudo_class<F>(
&self,
pseudo: &PseudoClass,
_context: &mut MatchingContext<KuchikiSelectors>,
_flags_setter: &mut F
) -> bool where
F: FnMut(&Self, ElementSelectorFlags),
[src]
fn match_non_ts_pseudo_class<F>(
&self,
pseudo: &PseudoClass,
_context: &mut MatchingContext<KuchikiSelectors>,
_flags_setter: &mut F
) -> bool where
F: FnMut(&Self, ElementSelectorFlags),
fn pseudo_element_originating_element(&self) -> Option<Self>
[src]
fn pseudo_element_originating_element(&self) -> Option<Self>
The parent of a given pseudo-element, after matching a pseudo-element selector. Read more
fn assigned_slot(&self) -> Option<Self>
[src]
fn assigned_slot(&self) -> Option<Self>
Returns the assigned element this element is assigned to. Read more
fn ignores_nth_child_selectors(&self) -> bool
[src]
fn ignores_nth_child_selectors(&self) -> bool
Returns whether this element should ignore matching nth child selector. Read more
Auto Trait Implementations
impl<T> !Send for NodeDataRef<T>
impl<T> !Send for NodeDataRef<T>
impl<T> !Sync for NodeDataRef<T>
impl<T> !Sync for NodeDataRef<T>