[][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.

Methods

impl<T> NodeDataRef<T>[src]

pub fn new<F>(rc: NodeRef, f: F) -> NodeDataRef<T> where
    F: FnOnce(&Node) -> &T, 
[src]

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]

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> Clone for NodeDataRef<T>[src]

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

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

type Target = T

The resulting type after dereferencing.

impl Element for NodeDataRef<ElementData>[src]

type Impl = KuchikiSelectors

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

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

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

Auto Trait Implementations

impl<T> !RefUnwindSafe for NodeDataRef<T>

impl<T> !Send for NodeDataRef<T>

impl<T> !Sync for NodeDataRef<T>

impl<T> Unpin for NodeDataRef<T>

impl<T> !UnwindSafe for NodeDataRef<T>

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.