Struct AsyncIterator
#[repr(transparent)]
pub struct AsyncIterator<T = JsValue> { /* private fields */ }
Any object that conforms to the JS async iterator protocol. For example,
something returned by myObject[Symbol.asyncIterator]().
Implementations
impl<T> AsyncIterator<T>
fn next(&self) -> Result<Promise, JsValue>The
next()method always has to return a Promise which resolves to 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.
impl<T> AsyncIterator<T>
where
T: FromWasmAbi,
fn next_iterator(&self) -> Result<Promise<IteratorNext<T>>, JsValue> where Promise<IteratorNext<T>>: ErasableGenericOwn<Promise<IteratorNext<JsValue>>>,The
next()method always has to return a Promise which resolves to 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 AsyncIterator
fn from(obj: JsValue) -> Self
impl<T> AsRef<AsyncIterator<T>> for AsyncIterator<T>
fn as_ref(&self) -> &AsyncIterator<T>
impl<T> AsRef<JsValue> for AsyncIterator<T>
fn as_ref(&self) -> &JsValue
impl<T> AsyncIterable for AsyncIterator<T>
type Item = T;
impl<T> Deref for AsyncIterator<T>
type Target = JsValue;fn deref(&self) -> &JsValue
impl<T> ErasableGeneric for AsyncIterator<T>
type Repr = JsValue;
impl<T> FromWasmAbi for AsyncIterator<T>
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl<T> IntoJsGeneric for AsyncIterator<T>
where
AsyncIterator<T>: JsGeneric,
type JsCanon = AsyncIterator<T>;fn to_js(self) -> AsyncIterator<T>
impl<T> IntoWasmAbi for AsyncIterator<T>
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl<T> JsCast for AsyncIterator<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 AsyncIterator<T>
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = AsyncIterator<T>;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl<T> OptionFromWasmAbi for AsyncIterator<T>
fn is_none(abi: &Self::Abi) -> bool
impl<T> OptionIntoWasmAbi for AsyncIterator<T>
fn none() -> Self::Abi
impl<T> Promising for AsyncIterator<T>
type Resolution = AsyncIterator<T>;
impl<T> RefFromWasmAbi for AsyncIterator<T>
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<AsyncIterator<T>>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl<T> WasmDescribe for AsyncIterator<T>
fn describe()
impl<T, __UpcastTarget0> UpcastFrom<AsyncIterator<T>> for AsyncIterator<__UpcastTarget0>
where
__UpcastTarget0: UpcastFrom<T>,
impl<T: Clone> Clone for AsyncIterator<T>
fn clone(&self) -> Self
impl<T: Debug> Debug for AsyncIterator<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result