pub fn for_of<Context, Callback, OtherError>(
cx: &mut Context,
iterable: HandleValue<'_>,
callback: Callback,
) -> Result<(), ForOfIterationFailure<OtherError>>where
Context: AsMut<JSContext>,
Callback: FnMut(&mut Context, HandleValue<'_>) -> Result<ControlFlow<()>, ForOfIterationFailure<OtherError>>,Expand description
Helper for running for .. of iteration from rust.
If Ok() is returned then the iteration completed without unexpected failures.
The callback returns Err() to indicate a pending exception or Ok() containing a boolean
value that is true if the iterator should continue iterating.