Sub

sealed trait Sub[+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[Msg]
class Combine[Msg]
object Empty.type
class OfObservable[Err, Value, Msg]

Value members

Abstract methods

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

Transforms the type of messages produced by the subscription

Transforms the type of messages produced by the subscription

Concrete methods

final def combine[LubMsg >: Msg](sub2: Sub[LubMsg]): Sub[LubMsg]

Merges the notifications of this subscription and sub2

Merges the notifications of this subscription and sub2

final def |+|[LubMsg >: Msg](sub2: Sub[LubMsg]): Sub[LubMsg]