pub struct GeneratorState {
pub is_async: bool,
/* private fields */
}Expand description
A generator object’s saved execution.
The reference keeps this as a JSAsyncFunctionState hanging off the object; the shape
here is the same, with a whole [Frame] standing in for its JSStackFrame plus the
separately allocated buffers.
Fields§
§is_async: boolWhether this came from an async function*.
A sync generator and an async one share ObjectKind::Generator, so without this
flag %AsyncGeneratorPrototype%.next happily ran a sync generator’s body:
AsyncGeneratorValidate has to tell them apart
(AsyncGeneratorPrototype/next/this-val-not-async-generator.js).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GeneratorState
impl !Send for GeneratorState
impl !Sync for GeneratorState
impl !UnwindSafe for GeneratorState
impl Forget for GeneratorState
impl Freeze for GeneratorStatewhere
*const GcBox<CompiledCode> is !null: Freeze,
*const GcBox<ClosureEnv> is !null: Freeze,
*const GcBox<JsString> is !null: Freeze,
*const GcBox<JsObject> is !null: Freeze,
*const GcBox<JsSymbol> is !null: Freeze,
*const GcBox<BigInt> is !null: Freeze,
*const u8 is !null: Freeze,
PhantomData<Value>: Freeze,
*const Vec<Value> is !null: Freeze,
PhantomData<Vec<Value>>: Freeze,
PhantomData<Gc<Cell>>: Freeze,
*const GcBox<LocalVars> is !null: Freeze,
PhantomData<AsyncRequest>: Freeze,
impl Move for GeneratorState
impl Unpin for GeneratorStatewhere
*const GcBox<CompiledCode> is !null: Unpin,
*const GcBox<ClosureEnv> is !null: Unpin,
*const GcBox<JsString> is !null: Unpin,
*const GcBox<JsObject> is !null: Unpin,
*const GcBox<JsSymbol> is !null: Unpin,
*const GcBox<BigInt> is !null: Unpin,
*const u8 is !null: Unpin,
Box<Vec<Value>>: Unpin,
*const GcBox<Cell> is !null: Unpin,
*const GcBox<LocalVars> is !null: Unpin,
impl UnsafeUnpin for GeneratorStatewhere
*const GcBox<CompiledCode> is !null: UnsafeUnpin,
*const GcBox<ClosureEnv> is !null: UnsafeUnpin,
*const GcBox<JsString> is !null: UnsafeUnpin,
*const GcBox<JsObject> is !null: UnsafeUnpin,
*const GcBox<JsSymbol> is !null: UnsafeUnpin,
*const GcBox<BigInt> is !null: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const Vec<Value> is !null: UnsafeUnpin,
PhantomData<Vec<Value>>: UnsafeUnpin,
PhantomData<Gc<Cell>>: UnsafeUnpin,
*const GcBox<LocalVars> is !null: UnsafeUnpin,
PhantomData<AsyncRequest>: UnsafeUnpin,
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