pub trait Iterable {
type Key: ToJSValConvertible;
type Value: ToJSValConvertible;
// Required methods
fn get_iterable_length(&self) -> u32;
fn get_value_at_index(&self, index: u32) -> Self::Value;
fn get_key_at_index(&self, index: u32) -> Self::Key;
}
Expand description
A DOM object that can be iterated over using a pair value iterator.
Required Associated Types§
sourcetype Key: ToJSValConvertible
type Key: ToJSValConvertible
The type of the key of the iterator pair.
sourcetype Value: ToJSValConvertible
type Value: ToJSValConvertible
The type of the value of the iterator pair.
Required Methods§
sourcefn get_iterable_length(&self) -> u32
fn get_iterable_length(&self) -> u32
Return the number of entries that can be iterated over.
sourcefn get_value_at_index(&self, index: u32) -> Self::Value
fn get_value_at_index(&self, index: u32) -> Self::Value
Return the value at the provided index.
sourcefn get_key_at_index(&self, index: u32) -> Self::Key
fn get_key_at_index(&self, index: u32) -> Self::Key
Return the key at the provided index.