ReadChannel

gopher.ReadChannel
See theReadChannel companion object
trait ReadChannel[F[_], A]

ReadChannel: Interface providing asynchronous reading API.

Attributes

Companion:
object
Source:
ReadChannel.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
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 DelayedReadChannel[F, T]
class MappedAsyncReadChannel[F, A, B]
class MappedReadChannel[F, A, B]
class OrReadChannel[F, A]
Self type

Members list

Concise view

Type members

Classlikes

class DoneReadChannel extends ReadChannel[F, Unit]

Attributes

Source:
ReadChannel.scala
Graph
Supertypes
trait ReadChannel[F, Unit]
class Object
trait Matchable
class Any
class SimpleReader(f: Try[A] => Unit) extends Reader[A]

Attributes

Source:
ReadChannel.scala
Graph
Supertypes
trait Reader[A]
trait Expirable[Try[A] => Unit]
class Object
trait Matchable
class Any

Types

type done = Unit

Attributes

Source:
ReadChannel.scala
type read = A

Special type which is used in select statement.

Special type which is used in select statement.

Attributes

See also:

[gopher.Select]

Source:
ReadChannel.scala

Value members

Abstract methods

def addDoneReader(reader: Reader[Unit]): Unit

Attributes

Source:
ReadChannel.scala
def addReader(reader: Reader[A]): Unit

Attributes

Source:
ReadChannel.scala

Attributes

Source:
ReadChannel.scala

Concrete methods

transparent inline def ?(using mc: CpsMonadContext[F]): A

Synonim for read.

Synonim for read.

Attributes

Source:
ReadChannel.scala
def aOptRead(): F[Option[A]]

read value and return future with

read value and return future with

  • Some(value) if value is available to read
  • None if stream is closed.

Attributes

Source:
ReadChannel.scala
def afold[S](s0: S)(f: (S, A) => S): F[S]

Attributes

Source:
ReadChannel.scala
def afold_async[S](s0: S)(f: (S, A) => F[S]): F[S]

Attributes

Source:
ReadChannel.scala
def aforeach(f: A => Unit): F[Unit]

Attributes

Source:
ReadChannel.scala
def aforeach_async(f: A => F[Unit]): F[F[Unit]]

Attributes

Source:
ReadChannel.scala
def append(other: ReadChannel[F, A]): ReadChannel[F, A]

Attributes

Source:
ReadChannel.scala
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.

Attributes

Source:
ReadChannel.scala
def asyncMonad: CpsSchedulingMonad[F]

Attributes

Source:
ReadChannel.scala
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.

Attributes

Source:
ReadChannel.scala
def dup(bufSize: Int, expiration: Duration): (ReadChannel[F, A], ReadChannel[F, A])

Attributes

Source:
ReadChannel.scala
def filter(p: A => Boolean): ReadChannel[F, A]

Attributes

Source:
ReadChannel.scala
def filterAsync(p: A => F[Boolean]): ReadChannel[F, A]

Attributes

Source:
ReadChannel.scala
transparent inline def fold[S](inline s0: S)(inline f: (S, A) => S)(using mc: CpsMonadContext[F]): S

Attributes

Source:
ReadChannel.scala
def fold_async[S](s0: S)(f: (S, A) => F[S]): F[S]

Attributes

Source:
ReadChannel.scala
transparent inline def foreach(inline f: A => Unit)(using CpsMonadContext[F]): 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

Attributes

Source:
ReadChannel.scala
def foreach_async(f: A => F[Unit]): F[Unit]

Attributes

Source:
ReadChannel.scala
def map[B](f: A => B): ReadChannel[F, B]

Attributes

Source:
ReadChannel.scala
def mapAsync[B](f: A => F[B]): ReadChannel[F, B]

Attributes

Source:
ReadChannel.scala
transparent inline def optRead()(using CpsMonadContext[F]): Option[A]

read value and return

read value and return

  • Some(value) if value is available to read
  • None if stream is closed.

should be called inside async block.

Attributes

Source:
ReadChannel.scala
def or(other: ReadChannel[F, A]): ReadChannel[F, A]

Attributes

Source:
ReadChannel.scala
transparent inline def read[G[_]]()(using mc: CpsMonadContext[G]): A

blocked read: if currently not element available - wait for one. Can be used only inside async block. If stream is closed and no values to read left in the stream - throws StreamClosedException

blocked read: if currently not element available - wait for one. Can be used only inside async block. If stream is closed and no values to read left in the stream - throws StreamClosedException

Attributes

Source:
ReadChannel.scala
transparent inline def take(n: Int)(using CpsMonadContext[F]): IndexedSeq[A]

take first n elements. should be called inside async block.

take first n elements. should be called inside async block.

Attributes

Source:
ReadChannel.scala
def zip[B](x: ReadChannel[F, B]): ReadChannel[F, (A, B)]

Attributes

Source:
ReadChannel.scala
def |(other: ReadChannel[F, A]): ReadChannel[F, A]

Attributes

Source:
ReadChannel.scala

Concrete fields

lazy val done: ReadChannel[F, Unit]

Attributes

Source:
ReadChannel.scala