trait Sync[-In, +R] extends Consumer[In, R]
Defines a synchronous Consumer that builds synchronous subscribers.
- Source
 - Consumer.scala
 
- Alphabetic
 - By Inheritance
 
- Sync
 - Consumer
 - Serializable
 - Serializable
 - Function1
 - AnyRef
 - Any
 
- Hide All
 - Show All
 
- Public
 - All
 
Abstract Value Members
- 
      
      
      
        
      
    
      
        abstract 
        def
      
      
        createSubscriber(cb: Callback[R], s: Scheduler): (observers.Subscriber.Sync[In], AssignableCancelable)
      
      
      
Builds a new Subscriber that can be subscribed to an Observable for consuming a stream, with a callback that should eventually get called with a materialized result.
Builds a new Subscriber that can be subscribed to an Observable for consuming a stream, with a callback that should eventually get called with a materialized result.
Notes:
- calling the callback must obey the contract for the Callback type
 - the given callback should always get called, unless the upstream gets canceled
 - the given callback can be called when the subscriber is finished processing, but not necessarily
 - if the given callback isn't called after the subscriber is
   done processing, then the 
Taskreturned by apply loses the ability to cancel the stream, as thatTaskwill complete before the stream is finished 
 
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
      
      
        andThen[A](g: (Task[R]) ⇒ A): (Observable[In]) ⇒ A
      
      
      
- Definition Classes
 - Function1
 - Annotations
 - @unspecialized()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        apply(source: Observable[In]): Task[R]
      
      
      
Given a source Observable, convert it into a Task by piggybacking on createSubscriber.
Given a source Observable, convert it into a Task by piggybacking on createSubscriber.
- Definition Classes
 - Consumer → Function1
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        asInstanceOf[T0]: T0
      
      
      
- Definition Classes
 - Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      
- Attributes
 - protected[java.lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws( ... )
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        compose[A](g: (A) ⇒ Observable[In]): (A) ⇒ Task[R]
      
      
      
- Definition Classes
 - Function1
 - Annotations
 - @unspecialized()
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        contramap[In2](f: (In2) ⇒ In): Consumer[In2, R]
      
      
      
Given a contravariant mapping function, transform the source consumer by transforming the input.
Given a contravariant mapping function, transform the source consumer by transforming the input.
- Definition Classes
 - Consumer
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        finalize(): Unit
      
      
      
- Attributes
 - protected[java.lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws( classOf[java.lang.Throwable] )
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        getClass(): Class[_]
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        hashCode(): Int
      
      
      
- Definition Classes
 - AnyRef → Any
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        isInstanceOf[T0]: Boolean
      
      
      
- Definition Classes
 - Any
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        map[R2](f: (R) ⇒ R2): Consumer[In, R2]
      
      
      
Given a mapping function, when consuming a stream, applies the mapping function to the final result, thus modifying the output of the source consumer.
Given a mapping function, when consuming a stream, applies the mapping function to the final result, thus modifying the output of the source consumer.
Note that for applying the mapping function an asynchronous boundary is forced, otherwise it could trigger a stack overflow exception. For more efficient mapping of the result, it's probably better to
mapthe resultingTaskon Observable.consumeWith. - 
      
      
      
        
      
    
      
        
        def
      
      
        mapAsync[R2](f: (R) ⇒ Task[R2]): Consumer[In, R2]
      
      
      
Given a mapping function, when consuming a stream, applies the mapping function to the final result, thus modifying the output of the source consumer.
Given a mapping function, when consuming a stream, applies the mapping function to the final result, thus modifying the output of the source consumer.
The mapping function returns a Task that can be used to process results asynchronously.
Note that for applying the mapping function an asynchronous boundary is forced, otherwise it could trigger a stack overflow exception. For more efficient mapping of the result, it's probably better to
mapthe resultingTaskon Observable.consumeWith.- Definition Classes
 - Consumer
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        ne(arg0: AnyRef): Boolean
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        notify(): Unit
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        notifyAll(): Unit
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      
- Definition Classes
 - AnyRef
 
 - 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      
- Definition Classes
 - Function1 → 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( ... )
 
 

This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomictypes, as alternative tojava.util.concurrent.atomicmonix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observablepattern:Observableimplementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types.