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]().

MDN documentation

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) -> bool
fn is_type_of(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn 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>

Auto Trait Implementations

impl<T> Freeze for Iterator<T> where PhantomData<(T,)>: Freeze,

impl<T> RefUnwindSafe for Iterator<T> where PhantomData<(T,)>: RefUnwindSafe,

impl<T> Send for Iterator<T> where PhantomData<(T,)>: Send,

impl<T> Sync for Iterator<T> where PhantomData<(T,)>: Sync,

impl<T> Unpin for Iterator<T> where PhantomData<(T,)>: Unpin,

impl<T> UnsafeUnpin for Iterator<T> where PhantomData<(T,)>: UnsafeUnpin,

impl<T> UnwindSafe for Iterator<T> where PhantomData<(T,)>: UnwindSafe,

Blanket Implementations

impl<P, T> Receiver for Iterator<T> where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for Iterator<T> where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for Iterator<T> where T: 'static + ?Sized,

impl<T> Borrow<T> for Iterator<T> where T: ?Sized,

impl<T> BorrowMut<T> for Iterator<T> where T: ?Sized,

impl<T> CloneToUninit for Iterator<T> where T: Clone,

impl<T> From<T> for Iterator<T>

impl<T> JsGeneric for Iterator<T> where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for Iterator<T> where T: IntoWasmAbi,

impl<T> ToOwned for Iterator<T> where T: Clone,

impl<T> TryFromJsValue for Iterator<T> where T: JsCast,

impl<T> VectorFromWasmAbi for Iterator<T> where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for Iterator<T> where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for Iterator<T> where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for Iterator<T> where U: From<T>,

impl<T, U> TryFrom<U> for Iterator<T> where U: Into<T>,

impl<T, U> TryInto<U> for Iterator<T> where U: TryFrom<T>,