sealed trait Bag[BAG[_]] extends AnyRef
Bags implement functions for managing side-effect. You can use any external effect type like Try, Future etc.
Popular effect libraries in Scala like Cats, ZIO and Monix are supported internally. See examples repo for samples.
Bag.Less can be used to disable effect types.
- Self Type
- Bag[BAG]
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- Bag
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
- abstract def apply[A](a: ⇒ A): BAG[A]
- abstract def failure[A](exception: Throwable): BAG[A]
- abstract def flatMap[A, B](fa: BAG[A])(f: (A) ⇒ BAG[B]): BAG[B]
- abstract def flatten[A](fa: BAG[BAG[A]]): BAG[A]
- abstract def foreach[A](a: BAG[A])(f: (A) ⇒ Unit): Unit
- abstract def fromIO[E, A](a: IO[E, A])(implicit arg0: ExceptionHandler[E]): BAG[A]
- abstract def map[A, B](a: BAG[A])(f: (A) ⇒ B): BAG[B]
- abstract def none[A]: BAG[Option[A]]
- abstract def success[A](value: A): BAG[A]
-
abstract
def
suspend[B](f: ⇒ BAG[B]): BAG[B]
For Async Bags apply will always run asynchronously but to cover cases where the operation might already be executed suspend is used.
- abstract def transform[A, B](a: BAG[A])(f: (A) ⇒ B): BAG[B]
- abstract def unit: BAG[Unit]
Concrete 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
and[A, B](fa: BAG[A])(f: ⇒ BAG[B]): BAG[B]
- Annotations
- @inline()
-
def
andIO[E, A, B](fa: BAG[A])(f: ⇒ IO[E, B])(implicit arg0: ExceptionHandler[E]): BAG[B]
- Annotations
- @inline()
-
def
andThen[A, B](fa: BAG[A])(f: ⇒ B): BAG[B]
- Annotations
- @inline()
-
def
andTransform[A, B](fa: BAG[A])(f: ⇒ B): BAG[B]
- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def filter[A](a: BAG[A])(f: (A) ⇒ Boolean): BAG[A]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getOrElseOption[A, B >: A](fa: BAG[Option[A]])(orElse: ⇒ B): BAG[B]
- def getOrElseOptionFlatten[A, B >: A](fa: BAG[Option[A]])(orElse: ⇒ BAG[B]): BAG[B]
-
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 orElseOption[A, B >: A](fa: BAG[Option[A]])(orElse: ⇒ Option[B]): BAG[Option[B]]
- def orElseOptionFlatten[A, B >: A](fa: BAG[Option[A]])(orElse: ⇒ BAG[Option[B]]): BAG[Option[B]]
- def safe[A](f: ⇒ BAG[A]): BAG[A]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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
- @throws( ... ) @native()