object SyncIO extends SyncIOInstances
- Source
- SyncIO.scala
- Alphabetic
- By Inheritance
- SyncIO
- SyncIOInstances
- SyncIOLowPriorityInstances
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def defer[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
. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): 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 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[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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
- implicit val syncIOalign: Align[SyncIO]
- Definition Classes
- SyncIOInstances
- implicit val syncIOsyncEffect: SyncEffect[SyncIO]
- Definition Classes
- SyncIOInstances
- 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
- 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(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- 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
.- Annotations
- @deprecated
- Deprecated
(Since version 2.5.3) use defer
- val syncIoSync: Sync[SyncIO]
- Definition Classes
- SyncIOInstances
- Annotations
- @deprecated
- Deprecated
(Since version 2.1.0) Signature changed to return SyncEffect
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):