Returns a string that describes the internal state of the coroutine.
Returns a string that describes the internal state of the coroutine.
Contains more information than toString
.
A string containing information about the internal state of the coroutine.
Returns an Option
object wrapping the exception thrown by this coroutine.
Returns an Option
object wrapping the exception thrown by this coroutine.
If hasException
, a Some
instance wrapping the exception thrown by
this coroutine. Otherwise, None
.
Returns an Option
wrapping this coroutine's non-exception result, if any.
Returns an Option
wrapping this coroutine's non-exception result, if any.
Some(result)
if hasResult
, None
otherwise.
Returns an Option
instance wrapping the current value of the coroutine, if
any.
Returns an Option
instance wrapping the current value of the coroutine, if
any.
Some(value)
if hasValue
, None
otherwise.
Returns whether or not the coroutine completed with an exception.
Returns whether or not the coroutine completed with an exception.
true
iff isCompleted
and the coroutine has a non-null
exception, false
otherwise.
Returns whether or not the coroutine completed without an exception.
Returns whether or not the coroutine completed without an exception.
true
if the coroutine completed without an exception, false
otherwise.
Returns whether or not the coroutine yielded a value.
Returns whether or not the coroutine yielded a value.
This value can be accessed via getValue
.
true
if the coroutine yielded a value, false
otherwise.
Returns true
iff the coroutine instance completed execution.
Returns true
iff the coroutine instance completed execution.
See the documentation for isLive
.
!isLive
.
Returns false
iff the coroutine instance completed execution.
Returns false
iff the coroutine instance completed execution.
This is true if there are either more yield statements or if the coroutine has not yet returned its result.
true
if resume
can be called without an exception being
thrown, false
otherwise.
Calls resume
until either the coroutine yields a value or returns.
Calls resume
until either the coroutine yields a value or returns.
If pull
returns true
, then the coroutine has suspended by yielding
a value and there are more elements to traverse.
Usage:
while (c.pull) c.value
false
if the coroutine stopped, true
otherwise.
If the coroutine is not live.
The value returned by the coroutine, if the coroutine is completed.
The value returned by the coroutine, if the coroutine is completed.
This method will throw an exception if the result cannot be accessed.
Note: the returned value is not the same as the value yielded by the coroutine. The coroutine may yield any number of values during its lifetime, but it returns only a single value after it terminates.
The return value of the coroutine, if the coroutine is completed.
If hasException
.
If !isCompleted
.
Advances the coroutine to the next yield point.
Advances the coroutine to the next yield point.
true
if resume can be called again, false
otherwise.
If the coroutine is not live.
Clones the coroutine that this instance is a part of.
Clones the coroutine that this instance is a part of.
A new coroutine instance with exactly the same execution state.
Returns a string representation of the coroutine's state.
Returns a string representation of the coroutine's state.
Contains less information than debugString
.
A string describing the coroutine state.
Returns a Try
object wrapping either the successful result of this
coroutine or the exception that the coroutine threw.
Returns a Try
object wrapping either the successful result of this
coroutine or the exception that the coroutine threw.
A Failure
instance if the coroutine has an exception,
Try(result)
otherwise.
Returns a Try
instance wrapping this coroutine's value, if any.
Returns a Try
instance wrapping this coroutine's value, if any.
The Try
wraps either the current value of this coroutine or any exceptions
thrown when trying to get the value.
Success(value)
if value
does not throw an exception, or
a Failure
instance if it does.
Returns the value yielded by the coroutine.
Returns the value yielded by the coroutine.
This method will thrown an exception if the value cannot be accessed.
The value yielded by the coroutine, if there is one.
If the coroutine doesn't have a value or if it is not live.