Sub

sealed trait Sub[+F[_], +Msg]

A subscription describes a resource that an application is interested in.

Examples:

  • a timeout notifies its subscribers when it expires,
  • a video being played notifies its subscribers with subtitles.
Type parameters:
Msg

Type of message produced by the resource

Companion:
object
class Object
trait Matchable
class Any
class Batch[F, Msg]
class Combine[F, Msg]
object None.type
class Observe[F, A, Msg]

Value members

Abstract methods

def map[OtherMsg](f: Msg => OtherMsg): Sub[F, OtherMsg]

Transforms the type of messages produced by the subscription

Transforms the type of messages produced by the subscription

Concrete methods

def combine[F2[x], LubMsg >: Msg](other: Sub[F2, LubMsg]): Sub[F2, LubMsg]

Infix operation for combining two Subs into one.

Infix operation for combining two Subs into one.

def |+|[F2[x], LubMsg >: Msg](other: Sub[F2, LubMsg]): Sub[F2, LubMsg]

Infix operator for combining two Subs into one.

Infix operator for combining two Subs into one.