[][src]Struct kuchiki::NodeDataRef

pub struct NodeDataRef<T> { /* fields omitted */ }

Holds a strong reference to a node, but dereferences to some component inside of it.


impl<T> NodeDataRef<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>, 

Create a NodeDataRef for and a component that may or may not be in a given node.

pub fn as_node(&self) -> &NodeRef[src]

Access the corresponding node.

impl NodeDataRef<ElementData>[src]

pub fn text_contents(&self) -> String[src]

Return the concatenation of all text nodes in this subtree.

Trait Implementations

impl<T> PartialEq<NodeDataRef<T>> for NodeDataRef<T>[src]

fn ne(&self, other: &Rhs) -> bool

This method tests for !=.

impl<T> Clone for NodeDataRef<T>[src]

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl<T: Eq> Eq for NodeDataRef<T>[src]

impl<T> Deref for NodeDataRef<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Debug> Debug for NodeDataRef<T>[src]

impl Element for NodeDataRef<ElementData>[src]

type Impl = KuchikiSelectors

fn pseudo_element_originating_element(&self) -> Option<Self>[src]

The parent of a given pseudo-element, after matching a pseudo-element selector. Read more

fn assigned_slot(&self) -> Option<Self>[src]

Returns the assigned element this element is assigned to. Read more

fn ignores_nth_child_selectors(&self) -> bool[src]

Returns whether this element should ignore matching nth child selector. Read more

Auto Trait Implementations

impl<T> !Send for NodeDataRef<T>

impl<T> !Sync for NodeDataRef<T>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized