enum IterRec {
Lazy {
iterator: Value,
next_fn: Value,
await_items: bool,
},
Async {
iterator: Value,
},
List {
items: Vec<Value>,
idx: usize,
deferred: Option<Value>,
await_items: bool,
},
}Expand description
for-in/of の反復の状態(木の評価の exec_for_in と同じ 3 通り)。
Variants§
Lazy
利用者定義の反復子・generator を 1 つずつ(open_lazy_iterator)。抜けるときは IteratorClose。
await_items は for-await で同期の反復子を使う場合(要素を await する)。
Async
for-await の Symbol.asyncIterator。
List
一括で取り出した要素(配列・for-in のキーなど)。deferred は途中で溜めた例外(反復を最後まで回したら投げる)。
Auto Trait Implementations§
impl !RefUnwindSafe for IterRec
impl !Send for IterRec
impl !Sync for IterRec
impl !UnwindSafe for IterRec
impl Freeze for IterRec
impl Unpin for IterRec
impl UnsafeUnpin for IterRec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more