object SyncIO extends SyncIOInstances
- Source
- SyncIO.scala
- Alphabetic
- By Inheritance
- SyncIO
- SyncIOInstances
- SyncIOLowPriorityInstances
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[A](thunk: ⇒ A): SyncIO[A]
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
. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
eval[A](fa: Eval[A]): SyncIO[A]
Lifts an
Eval
intoSyncIO
.Lifts an
Eval
intoSyncIO
.This function will preserve the evaluation semantics of any actions that are lifted into the pure
SyncIO
. EagerEval
instances will be converted into thunk-lessSyncIO
(i.e. eagerSyncIO
), while lazy eval and memoized will be executed as such. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromEither[A](e: Either[Throwable, A]): SyncIO[A]
Lifts an
Either[Throwable, A]
into theSyncIO[A]
context, raising the throwable if it exists. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
pure[A](a: A): SyncIO[A]
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) thanSyncIO(42)
, due to avoiding the allocation of extra thunks. -
def
raiseError[A](e: Throwable): SyncIO[A]
Constructs a
SyncIO
which sequences the specified exception.Constructs a
SyncIO
which sequences the specified exception.If this
SyncIO
is run usingunsafeRunSync
the exception will be thrown. This exception can be "caught" (or rather, materialized into value-space) using theattempt
method.- See also
-
def
suspend[A](thunk: ⇒ SyncIO[A]): SyncIO[A]
Suspends a synchronous side effect which produces a
SyncIO
inSyncIO
.Suspends a synchronous side effect which produces a
SyncIO
inSyncIO
.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
. -
implicit
def
syncIoMonoid[A](implicit arg0: Monoid[A]): Monoid[SyncIO[A]]
- Definition Classes
- SyncIOInstances
-
implicit
def
syncIoSemigroup[A](implicit arg0: Semigroup[A]): Semigroup[SyncIO[A]]
- Definition Classes
- SyncIOLowPriorityInstances
-
implicit
val
syncIoSemigroupK: SemigroupK[SyncIO]
- Definition Classes
- SyncIOInstances
-
implicit
val
syncIoSync: Sync[SyncIO]
- Definition Classes
- SyncIOInstances
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
unit: SyncIO[Unit]
Alias for
SyncIO.pure(())
. -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
This is the API documentation for the cats-effect library.
See the cats.effect package for a quick overview.
Links
Canonical documentation links:
Related Cats links (the core):