Struct stdweb::web::HtmlCollection [−][src]
pub struct HtmlCollection(_);
The HtmlCollection
interface represents a generic collection
(array-like object similar to arguments) of elements (in document order)
and offers methods and properties for selecting from the list.
An HtmlCollection
in the HTML DOM is live; it is automatically
updated when the underlying document is changed.
Methods
impl HtmlCollection
[src]
impl HtmlCollection
pub fn len(&self) -> u32
[src]
pub fn len(&self) -> u32
Returns the number of elements in the collection.
pub fn item(&self, index: u32) -> Option<Element>
[src]
pub fn item(&self, index: u32) -> Option<Element>
Returns an element from an HtmlCollection
by index.
pub fn iter(&self) -> ElementIter
[src]
pub fn iter(&self) -> ElementIter
Returns an iterator over the collection.
Trait Implementations
impl Clone for HtmlCollection
[src]
impl Clone for HtmlCollection
fn clone(&self) -> HtmlCollection
[src]
fn clone(&self) -> HtmlCollection
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 Debug for HtmlCollection
[src]
impl Debug for HtmlCollection
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for HtmlCollection
[src]
impl PartialEq for HtmlCollection
fn eq(&self, other: &HtmlCollection) -> bool
[src]
fn eq(&self, other: &HtmlCollection) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &HtmlCollection) -> bool
[src]
fn ne(&self, other: &HtmlCollection) -> bool
This method tests for !=
.
impl Eq for HtmlCollection
[src]
impl Eq for HtmlCollection
impl InstanceOf for HtmlCollection
[src]
impl InstanceOf for HtmlCollection
fn instance_of(reference: &Reference) -> bool
[src]
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type Self
.
impl AsRef<Reference> for HtmlCollection
[src]
impl AsRef<Reference> for HtmlCollection
impl ReferenceType for HtmlCollection
[src]
impl ReferenceType for HtmlCollection
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more
impl From<HtmlCollection> for Reference
[src]
impl From<HtmlCollection> for Reference
fn from(value: HtmlCollection) -> Self
[src]
fn from(value: HtmlCollection) -> Self
Performs the conversion.
impl TryFrom<HtmlCollection> for Reference
[src]
impl TryFrom<HtmlCollection> for Reference
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: HtmlCollection) -> Result<Self, Self::Error>
[src]
fn try_from(value: HtmlCollection) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Reference> for HtmlCollection
[src]
impl TryFrom<Reference> for HtmlCollection
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
fn try_from(reference: Reference) -> Result<Self, Self::Error>
Performs the conversion.
impl<'_r> TryFrom<&'_r Reference> for HtmlCollection
[src]
impl<'_r> TryFrom<&'_r Reference> for HtmlCollection
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
Performs the conversion.
impl TryFrom<Value> for HtmlCollection
[src]
impl TryFrom<Value> for HtmlCollection
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
fn try_from(value: Value) -> Result<Self, Self::Error>
Performs the conversion.
impl<'_r> TryFrom<&'_r Value> for HtmlCollection
[src]
impl<'_r> TryFrom<&'_r Value> for HtmlCollection
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
fn try_from(value: &Value) -> Result<Self, Self::Error>
Performs the conversion.
impl JsSerialize for HtmlCollection
[src]
impl JsSerialize for HtmlCollection
impl IntoIterator for HtmlCollection
[src]
impl IntoIterator for HtmlCollection
type Item = Element
The type of the elements being iterated over.
type IntoIter = ElementIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<'a> IntoIterator for &'a HtmlCollection
[src]
impl<'a> IntoIterator for &'a HtmlCollection
Auto Trait Implementations
impl Send for HtmlCollection
impl Send for HtmlCollection
impl Sync for HtmlCollection
impl Sync for HtmlCollection