Function quickjs_runtime::quickjs_utils::iterators::iterate

source ·
pub unsafe fn iterate<C: Fn(QuickJsValueAdapter) -> Result<R, JsError>, R>(
    ctx: *mut JSContext,
    iterator_ref: &QuickJsValueAdapter,
    consumer_producer: C,
) -> Result<Vec<R>, JsError>
Expand description

iterate over an object conforming to the iterator protocol

§Safety

please ensure that the QuickjsContext corresponding to the passed JSContext is still valid