pub struct JavascriptGenerator { /* private fields */ }Expand description
Generator composed from the shared bounded resumable frame.
Implementations§
Source§impl JavascriptGenerator
impl JavascriptGenerator
Sourcepub fn new(
limits: FrameLimits,
dispatch: impl FnMut(ResumePacket<JavascriptValue, JavascriptException>, &mut StepBudget) -> Result<ResumeResult<JavascriptValue, JavascriptValue, JavascriptException>, FrameError> + 'static,
) -> Self
pub fn new( limits: FrameLimits, dispatch: impl FnMut(ResumePacket<JavascriptValue, JavascriptException>, &mut StepBudget) -> Result<ResumeResult<JavascriptValue, JavascriptValue, JavascriptException>, FrameError> + 'static, ) -> Self
Creates a bounded generator from JavaScript policy dispatch.
Sourcepub fn resume(
&mut self,
packet: ResumePacket<JavascriptValue, JavascriptException>,
) -> Result<ResumeResult<JavascriptValue, JavascriptValue, JavascriptException>, FrameError>
pub fn resume( &mut self, packet: ResumePacket<JavascriptValue, JavascriptException>, ) -> Result<ResumeResult<JavascriptValue, JavascriptValue, JavascriptException>, FrameError>
Resumes with next, throw, or return represented by a shared packet.
Auto Trait Implementations§
impl !RefUnwindSafe for JavascriptGenerator
impl !Send for JavascriptGenerator
impl !Sync for JavascriptGenerator
impl !UnwindSafe for JavascriptGenerator
impl Freeze for JavascriptGenerator
impl Unpin for JavascriptGenerator
impl UnsafeUnpin for JavascriptGenerator
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