pub(crate) struct GenFrame {
code: Rc<GenCode>,
pc: usize,
stack: Vec<Value>,
call_scope: Rc<RefCell<Scope>>,
scopes: Vec<Rc<RefCell<Scope>>>,
handlers: Vec<Handler>,
this: Value,
exception: Option<Value>,
delegate: Option<(Value, Value, bool)>,
in_delegate: bool,
delegate_in: Option<GenCompletion>,
is_async: bool,
}Expand description
中断中の generator の実行状態。
Fields§
§code: Rc<GenCode>§pc: usize§stack: Vec<Value>§call_scope: Rc<RefCell<Scope>>§scopes: Vec<Rc<RefCell<Scope>>>§handlers: Vec<Handler>§this: Value§exception: Option<Value>catch へ渡す例外。
delegate: Option<(Value, Value, bool)>yield* の委譲先(反復子・next・非同期から同期への変換か)。
in_delegate: boolyield* の途中で中断しているか(再開の値は delegate_in で YieldStar へ渡す)。
delegate_in: Option<GenCompletion>§is_async: boolImplementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GenFrame
impl !Send for GenFrame
impl !Sync for GenFrame
impl !UnwindSafe for GenFrame
impl Freeze for GenFrame
impl Unpin for GenFrame
impl UnsafeUnpin for GenFrame
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