[][src]Struct stdweb::web::NodeList

pub struct NodeList(_);

NodeList objects are collections of nodes such as those returned by properties such as INode::child_nodes and the Document::query_selector_all method.

In some cases, the NodeList is a live collection, which means that changes in the DOM are reflected in the collection - for example INode::child_nodes is live.

In other cases, the NodeList is a static collection, meaning any subsequent change in the DOM does not affect the content of the collection - for example Document::query_selector_all returns a static NodeList.

(JavaScript docs)

Methods

impl NodeList[src]

pub fn len(&self) -> u32[src]

Returns the number of Nodes contained in this list.

(JavaScript docs)

pub fn item(&self, index: u32) -> Option<Node>[src]

Returns a node from a NodeList by index.

(JavaScript docs)

pub fn iter(&self) -> NodeIter[src]

Returns an iterator over the list.

Trait Implementations

impl JsSerialize for NodeList[src]

impl TryFrom<NodeList> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for NodeList[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for NodeList[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for NodeList[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for NodeList[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for NodeList[src]

impl ReferenceType for NodeList[src]

impl AsRef<Reference> for NodeList[src]

impl From<NodeList> for Reference[src]

impl IntoIterator for NodeList[src]

type Item = Node

The type of the elements being iterated over.

type IntoIter = NodeIter

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a NodeList[src]

type Item = Node

The type of the elements being iterated over.

type IntoIter = NodeIter

Which kind of iterator are we turning this into?

impl Clone for NodeList[src]

impl Eq for NodeList[src]

impl PartialEq<NodeList> for NodeList[src]

impl Debug for NodeList[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.

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

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

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