ReadChannel

trait ReadChannel[F[_], A]

ReadChannel: Interface providing reading API.

Companion
object
class Object
trait Matchable
class Any
trait Channel[F, W, R]
class ChannelWithExpiration[F, W, R]
class BaseChannel[F, A]
class BufferedChannel[F, A]
class PromiseChannel[F, A]
class UnbufferedChannel[F, A]
class ChFlatMappedChannel[F, W, RA, RB]
class FilteredAsyncChannel[F, W, R]
class FilteredChannel[F, W, R]
class MappedAsyncChannel[F, W, RA, RB]
class MappedChannel[F, W, RA, RB]
class AppendReadChannel[F, A]
class MappedAsyncReadChannel[F, A, B]
class MappedReadChannel[F, A, B]
class OrReadChannel[F, A]

Type members

Classlikes

class DoneReadChannel extends ReadChannel[F, Unit]
class SimpleReader(f: Try[A] => Unit) extends Reader[A]

Types

type done = Unit
type read = A

Value members

Abstract methods

def addDoneReader(reader: Reader[Unit]): Unit
def addReader(reader: Reader[A]): Unit
def gopherApi: Gopher[F]

Concrete methods

inline def ?: A

Synonim for read.

Synonim for read.

def aOptRead(): F[Option[A]]
def afold[S](s0: S)(f: (S, A) => S): F[S]
def afold_async[S](s0: S)(f: (S, A) => F[S]): F[S]
def aforeach(f: A => Unit): F[Unit]
def aforeach_async(f: A => F[Unit]): F[F[Unit]]
def append(other: ReadChannel[F, A]): ReadChannel[F, A]
def aread(): F[A]

async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.

async version of read. Immediatly return future, which will contains result of read or failur with StreamClosedException in case of stream is closed.

def asyncMonad: CpsSchedulingMonad[F]
def atake(n: Int): F[IndexedSeq[A]]

return F which contains sequence from first n elements.

return F which contains sequence from first n elements.

def dup(bufSize: Int, expiration: Duration): (ReadChannel[F, A], ReadChannel[F, A])
def filter(p: A => Boolean): ReadChannel[F, A]
def filterAsync(p: A => F[Boolean]): ReadChannel[F, A]
inline def fold[S](inline s0: S)(inline f: (S, A) => S): S
def fold_async[S](s0: S)(f: (S, A) => F[S]): F[S]
inline def foreach(inline f: A => Unit): Unit

run code each time when new object is arriced. until end of stream is not reached

run code each time when new object is arriced. until end of stream is not reached

def foreach_async(f: A => F[Unit]): F[Unit]
def map[B](f: A => B): ReadChannel[F, B]
def mapAsync[B](f: A => F[B]): ReadChannel[F, B]
inline def optRead(): Option[A]
def or(other: ReadChannel[F, A]): ReadChannel[F, A]
inline def read(): A

blocked read: if currently not element available - wait for one. Can be used only inside async block

blocked read: if currently not element available - wait for one. Can be used only inside async block

inline def take(n: Int): IndexedSeq[A]
def zip[B](x: ReadChannel[F, B]): ReadChannel[F, (A, B)]
def |(other: ReadChannel[F, A]): ReadChannel[F, A]

Concrete fields

lazy val done: ReadChannel[F, Unit]