MappedChannel

class MappedChannel[F[_], W, RA, RB](internal: Channel[F, W, RA], f: RA => RB) extends MappedReadChannel[F, RA, RB] with Channel[F, W, RB]
trait Channel[F, W, RB]
trait Closeable
trait AutoCloseable
trait WriteChannel[F, W]
class MappedReadChannel[F, RA, RB]
trait ReadChannel[F, RB]
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class DoneReadChannel extends ReadChannel[F, Unit]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
class MReader(nested: Reader[B]) extends Reader[A]
class SimpleReader(f: Try[A] => Unit) extends Reader[A]
Inherited from:
ReadChannel
Source:
ReadChannel.scala

Inherited types

type done = Unit
Inherited from:
ReadChannel
Source:
ReadChannel.scala
type read = A

Special type which is used in select statement.

Special type which is used in select statement.

See also:

[gopher.Select]

Inherited from:
ReadChannel
Source:
ReadChannel.scala
type write = A
Inherited from:
WriteChannel
Source:
WriteChannel.scala

Value members

Concrete methods

override def addWriter(writer: Writer[W]): Unit
Definition Classes
Source:
MappedChannel.scala
override def close(): Unit
Definition Classes
Closeable -> AutoCloseable
Source:
MappedChannel.scala
override def isClosed: Boolean
Definition Classes
Source:
MappedChannel.scala

Inherited methods

@targetName("write2")
transparent inline def !(inline a: W)(using CpsMonadContext[F]): Unit
Inherited from:
WriteChannel
Source:
WriteChannel.scala
@targetName("write1")
transparent inline def <~(inline a: W)(using CpsMonadContext[F]): Unit
Inherited from:
WriteChannel
Source:
WriteChannel.scala
transparent inline def ?(using mc: CpsMonadContext[F]): RB

Synonim for read.

Synonim for read.

Inherited from:
ReadChannel
Source:
ReadChannel.scala
def aOptRead(): F[Option[RB]]

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.
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def addDoneReader(reader: Reader[Unit]): Unit
def addReader(reader: Reader[RB]): Unit
def afold[S](s0: S)(f: (S, RB) => S): F[S]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def afold_async[S](s0: S)(f: (S, RB) => F[S]): F[S]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def aforeach(f: RB => Unit): F[Unit]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def aforeach_async(f: RB => F[Unit]): F[F[Unit]]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def append(other: ReadChannel[F, RB]): ReadChannel[F, RB]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def aread(): F[RB]

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.

Inherited from:
ReadChannel
Source:
ReadChannel.scala
def asyncMonad: CpsSchedulingMonad[F]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def atake(n: Int): F[IndexedSeq[RB]]

return F which contains sequence from first n elements.

return F which contains sequence from first n elements.

Inherited from:
ReadChannel
Source:
ReadChannel.scala
def awrite(a: W): F[Unit]
Inherited from:
WriteChannel
Source:
WriteChannel.scala
def awriteAll(collection: IterableOnce[W]): F[Unit]
Inherited from:
WriteChannel
Source:
WriteChannel.scala
def dup(bufSize: Int, expiration: Duration): (ReadChannel[F, RB], ReadChannel[F, RB])
Inherited from:
ReadChannel
Source:
ReadChannel.scala
override def filter(p: RB => Boolean): Channel[F, W, RB]
Definition Classes
Inherited from:
Channel
Source:
Channel.scala
override def filterAsync(p: RB => F[Boolean]): Channel[F, W, RB]
Definition Classes
Inherited from:
Channel
Source:
Channel.scala
def flatMap[R1](f: RB => ReadChannel[F, R1]): Channel[F, W, R1]
Inherited from:
Channel
Source:
Channel.scala
transparent inline def fold[S](inline s0: S)(inline f: (S, RB) => S)(using mc: CpsMonadContext[F]): S
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def fold_async[S](s0: S)(f: (S, RB) => F[S]): F[S]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
transparent inline def foreach(inline f: RB => 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

Inherited from:
ReadChannel
Source:
ReadChannel.scala
def foreach_async(f: RB => F[Unit]): F[Unit]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
override def map[R1](f: RB => R1): Channel[F, W, R1]
Definition Classes
Inherited from:
Channel
Source:
Channel.scala
override def mapAsync[R1](f: RB => F[R1]): Channel[F, W, R1]
Definition Classes
Inherited from:
Channel
Source:
Channel.scala
transparent inline def optRead()(using CpsMonadContext[F]): Option[RB]

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.

Inherited from:
ReadChannel
Source:
ReadChannel.scala
def or(other: ReadChannel[F, RB]): ReadChannel[F, RB]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
transparent inline def read[G[_]]()(using mc: CpsMonadContext[G]): RB

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

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

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

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

Inherited from:
ReadChannel
Source:
ReadChannel.scala
def withExpiration(ttl: FiniteDuration, throwTimeouts: Boolean): ChannelWithExpiration[F, W, RB]
Inherited from:
Channel
Source:
Channel.scala
def withWriteExpiration(ttl: FiniteDuration, throwTimeouts: Boolean)(using gopherApi: Gopher[F]): WriteChannelWithExpiration[F, W]
Inherited from:
WriteChannel
Source:
WriteChannel.scala
transparent inline def write(inline a: W)(using CpsMonadContext[F]): Unit
Inherited from:
WriteChannel
Source:
WriteChannel.scala
transparent inline def writeAll(inline collection: IterableOnce[W])(using mc: CpsMonadContext[F]): Unit
Inherited from:
WriteChannel
Source:
WriteChannel.scala
def zip[B](x: ReadChannel[F, B]): ReadChannel[F, (RB, B)]
Inherited from:
ReadChannel
Source:
ReadChannel.scala
def |(other: ReadChannel[F, RB]): ReadChannel[F, RB]
Inherited from:
ReadChannel
Source:
ReadChannel.scala

Inherited fields

lazy val done: ReadChannel[F, Unit]
Inherited from:
ReadChannel
Source:
ReadChannel.scala