pub enum SequencePoll<'gc> {
Pending,
Return,
Yield {
to_thread: Option<Thread<'gc>>,
is_tail: bool,
},
Call {
function: Function<'gc>,
is_tail: bool,
},
Resume {
thread: Thread<'gc>,
is_tail: bool,
},
}Variants§
Pending
Sequence pending, Sequence::poll will be called on the next step with the stack unchanged.
Return
Sequence finished, the values in the stack will be returned to the caller.
Yield
Yield the values in the stack inside a coroutine. If is_tail is true, then this also
finishes the sequence, otherwise Sequence::poll will be called when the coroutine is
resumed, or Sequence::error if the coroutine is resumed with an error.
Call
Call the given function with the arguments in the stack. If is_tail is true, then this
is a tail call, and the sequence is now finished, otherwise Sequence::poll will be called
with the results of the function call, or if the function errors, Sequence::error will be
called with the function error.
Resume
Auto Trait Implementations§
impl<'gc> Freeze for SequencePoll<'gc>
impl<'gc> !RefUnwindSafe for SequencePoll<'gc>
impl<'gc> !Send for SequencePoll<'gc>
impl<'gc> !Sync for SequencePoll<'gc>
impl<'gc> Unpin for SequencePoll<'gc>
impl<'gc> !UnwindSafe for SequencePoll<'gc>
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