Struct Iterator
#[repr(transparent)]
pub struct Iterator<T = JsValue> { /* private fields */ }
Any object that conforms to the JS iterator protocol. For example,
something returned by myArray[Symbol.iterator]().
Implementations
impl<T> Iterator<T>
where
T: FromWasmAbi,
fn next(&self) -> Result<IteratorNext<T>, JsValue> where IteratorNext<T>: ErasableGenericOwn<IteratorNext<JsValue>>,The
next()method always has to return an object with appropriate properties including done and value. If a non-object value gets returned (such as false or undefined), a TypeError ("iterator.next() returned a non-object value") will be thrown.
Trait Implementations
impl From<JsValue> for Iterator
fn from(obj: JsValue) -> Self
impl<T> AsRef<Iterator<T>> for Iterator<T>
fn as_ref(&self) -> &Iterator<T>
impl<T> AsRef<JsValue> for Iterator<T>
fn as_ref(&self) -> &JsValue
impl<T> Deref for Iterator<T>
type Target = JsValue;fn deref(&self) -> &JsValue
impl<T> ErasableGeneric for Iterator<T>
type Repr = JsValue;
impl<T> FromWasmAbi for Iterator<T>
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl<T> IntoJsGeneric for Iterator<T>
where
Iterator<T>: JsGeneric,
type JsCanon = Iterator<T>;fn to_js(self) -> Iterator<T>
impl<T> IntoWasmAbi for Iterator<T>
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl<T> Iterable for Iterator<T>
type Item = T;
impl<T> JsCast for Iterator<T>
fn instanceof(val: &JsValue) -> boolfn is_type_of(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl<T> LongRefFromWasmAbi for Iterator<T>
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = Iterator<T>;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl<T> OptionFromWasmAbi for Iterator<T>
fn is_none(abi: &Self::Abi) -> bool
impl<T> OptionIntoWasmAbi for Iterator<T>
fn none() -> Self::Abi
impl<T> Promising for Iterator<T>
type Resolution = Iterator<T>;
impl<T> RefFromWasmAbi for Iterator<T>
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<Iterator<T>>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl<T> WasmDescribe for Iterator<T>
fn describe()
impl<T, __UpcastTarget0> UpcastFrom<Iterator<T>> for Iterator<__UpcastTarget0>
where
__UpcastTarget0: UpcastFrom<T>,
impl<T: Clone> Clone for Iterator<T>
fn clone(&self) -> Self
impl<T: Debug> Debug for Iterator<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: FromWasmAbi + JsGeneric> IntoIterator for Iterator<T>
type Item = Result<T, JsValue>;type IntoIter = IntoIter<T>;fn into_iter(self) -> IntoIter<T>