Attributes
- Companion:
- class
- Source:
- SyncIO.scala
- Graph
- Supertypes
- trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- SyncIO.type
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- SyncIOLowPriorityImplicits (hidden)
- Source:
- SyncIO.scala
- Graph
- Supertypes
Inherited types
The names of the product elements
The name of the type
Value members
Concrete methods
Suspends a synchronous side effect in SyncIO
.
Suspends a synchronous side effect in SyncIO
.
Any exceptions thrown by the effect will be caught and sequenced into the SyncIO
.
Attributes
- thunk
side effectful expression to be suspended in
SyncIO
- Returns:
a
SyncIO
that will be evaluated to the side effectful expressionthunk
- Source:
- SyncIO.scala
Suspends a synchronous side effect which produces a SyncIO
in SyncIO
.
Suspends a synchronous side effect which produces a SyncIO
in SyncIO
.
This is useful for trampolining (i.e. when the side effect is conceptually the allocation
of a stack frame). Any exceptions thrown by the side effect will be caught and sequenced
into the SyncIO
.
Attributes
- thunk
SyncIO
expression to be suspended inSyncIO
- Returns:
a
SyncIO
that will be evaluated to the value of the suspendedthunk
- Source:
- SyncIO.scala
Alias for apply
.
Lifts an Eval
into SyncIO
.
Lifts an Eval
into SyncIO
.
This function will preserve the evaluation semantics of any actions that are lifted into
the pure SyncIO
. Eager Eval
instances will be converted into thunk-less SyncIO
(i.e.
eager SyncIO
), while lazy eval and memoized will be executed as such.
Attributes
- fa
Eval
instance to be lifted inSyncIO
- Returns:
SyncIO
that will be evaluated to the value of the liftedfa
- Source:
- SyncIO.scala
Lifts an Either[Throwable, A]
into SyncIO
, raising the throwable if it exists.
Lifts an Either[Throwable, A]
into SyncIO
, raising the throwable if it exists.
Attributes
- e
either value to be lifted
- Returns:
SyncIO
that evaluates to the value ofe
or fail with itsThrowable
instance- Source:
- SyncIO.scala
Lifts an Option[A]
into SyncIO
, raising orElse
if the provided option value is empty.
Lifts an Option[A]
into SyncIO
, raising orElse
if the provided option value is empty.
Attributes
- o
option value to be lifted
- orElse
expression that evaluates to
Throwable
- Returns:
SyncIO
that evaluates to the optional valueo
or fail with theorElse
expression- Source:
- SyncIO.scala
Lifts a Try[A]
into SyncIO
, raising the throwable if it exists.
Lifts a Try[A]
into SyncIO
, raising the throwable if it exists.
Attributes
- t
try value to be lifted
- Returns:
SyncIO
that evaluates to the value oft
if successful, or fails with itsThrowable
instance- Source:
- SyncIO.scala
Suspends a pure value in SyncIO
.
Suspends a pure value in SyncIO
.
This should ''only'' be used if the value in question has "already" been computed! In other
words, something like SyncIO.pure(readLine)
is most definitely not the right thing to do!
However, SyncIO.pure(42)
is correct and will be more efficient (when evaluated) than
SyncIO(42)
, due to avoiding the allocation of extra thunks.
Attributes
- value
precomputed value used as the result of the
SyncIO
- Returns:
an already evaluated
SyncIO
holdingvalue
- Source:
- SyncIO.scala
Constructs a SyncIO
which sequences the specified exception.
Constructs a SyncIO
which sequences the specified exception.
If this SyncIO
is run using unsafeRunSync
the exception will be thrown. This exception
can be "caught" (or rather, materialized into value-space) using the attempt
method.
Attributes
- t
Throwable
value to fail with- Returns:
a
SyncIO
that results in failure with valuet
- See also:
- Source:
- SyncIO.scala
Alias for SyncIO.pure(())
Inherited methods
Attributes
- Inherited from:
- SyncIOCompanionPlatform (hidden)
- Source:
- SyncIOCompanionPlatform.scala
Implicits
Implicits
Attributes
- Source:
- SyncIO.scala
Attributes
- Source:
- SyncIO.scala
Attributes
- Source:
- SyncIO.scala
Attributes
- Source:
- SyncIO.scala
Inherited implicits
Attributes
- Inherited from:
- SyncIOLowPriorityImplicits (hidden)
- Source:
- SyncIO.scala