ZPipeline

object ZPipeline
Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[In](implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

A shorter version of ZPipeline.identity, which can facilitate more compact definition of pipelines.

A shorter version of ZPipeline.identity, which can facilitate more compact definition of pipelines.

ZPipeline[Int] >>> ZPipeline.filter(_ % 2 != 0)
def branchAfter[Env, Err, In, Out](n: => Int)(f: Chunk[In] => ZPipeline[Env, Err, In, Out])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

A dynamic pipeline that first collects n elements from the stream, then creates another pipeline with the function f and sends all the following elements through that.

A dynamic pipeline that first collects n elements from the stream, then creates another pipeline with the function f and sends all the following elements through that.

def collect[In, Out](f: PartialFunction[In, Out])(implicit trace: Trace): ZPipeline[Any, Nothing, In, Out]

Creates a pipeline that collects elements with the specified partial function.

Creates a pipeline that collects elements with the specified partial function.

ZPipeline.collect[Option[Int], Int] { case Some(v) => v }
def decodeCharsWith(charset: => Charset, bufSize: => Int)(implicit trace: Trace): ZPipeline[Any, CharacterCodingException, Byte, Char]

Creates a pipeline that decodes a stream of bytes into a stream of characters using the given charset

Creates a pipeline that decodes a stream of bytes into a stream of characters using the given charset

def decodeStringWith(charset: => Charset)(implicit trace: Trace): ZPipeline[Any, CharacterCodingException, Byte, String]

Creates a pipeline that decodes a stream of bytes into a stream of strings using the given charset

Creates a pipeline that decodes a stream of bytes into a stream of strings using the given charset

def drop[In](n: => Int)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that drops n elements.

Creates a pipeline that drops n elements.

def dropUntil[In](f: In => Boolean)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that drops elements until the specified predicate evaluates to true.

Creates a pipeline that drops elements until the specified predicate evaluates to true.

ZPipeline.dropUntil[Int](_ > 100)
def dropWhile[In](f: In => Boolean)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that drops elements while the specified predicate evaluates to true.

Creates a pipeline that drops elements while the specified predicate evaluates to true.

ZPipeline.dropWhile[Int](_ <= 100)
def encodeCharsWith(charset: => Charset, bufferSize: => Int)(implicit trace: Trace): ZPipeline[Any, CharacterCodingException, Char, Byte]

Creates a pipeline that converts a stream of characters into a stream of bytes using the given charset

Creates a pipeline that converts a stream of characters into a stream of bytes using the given charset

def encodeStringWith(charset: => Charset, bom: => Chunk[Byte])(implicit trace: Trace): ZPipeline[Any, CharacterCodingException, String, Byte]

Creates a pipeline that converts a stream of strings into a stream of bytes using the given charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the given charset

def filter[In](f: In => Boolean)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that filters elements according to the specified predicate.

Creates a pipeline that filters elements according to the specified predicate.

def fromChannel[Env, Err, In, Out](channel: => ZChannel[Env, Nothing, Chunk[In], Any, Err, Chunk[Out], Any]): ZPipeline[Env, Err, In, Out]

Creates a pipeline that sends all the elements through the given channel.

Creates a pipeline that sends all the elements through the given channel.

def fromPush[Env, Err, In, Out](push: => ZIO[Scope & Env, Nothing, Option[Chunk[In]] => ZIO[Env, Err, Chunk[Out]]])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

Creates a pipeline from a chunk processing function.

Creates a pipeline from a chunk processing function.

def fromSink[Env, Err, In, Out](sink: => ZSink[Env, Err, In, In, Out])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

Creates a pipeline that repeatedly sends all elements through the given sink.

Creates a pipeline that repeatedly sends all elements through the given sink.

def groupAdjacentBy[In, Key](f: In => Key)(implicit trace: Trace): ZPipeline[Any, Nothing, In, (Key, NonEmptyChunk[In])]

Creates a pipeline that groups on adjacent keys, calculated by function f.

Creates a pipeline that groups on adjacent keys, calculated by function f.

def identity[In](implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

The identity pipeline, which does not modify streams in any way.

The identity pipeline, which does not modify streams in any way.

Creates a pipeline that converts a stream of bytes into a stream of strings using the ISO_8859_1 charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the ISO_8859_1 charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the ISO_8859_1 charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the ISO_8859_1 charset

def map[In, Out](f: In => Out)(implicit trace: Trace): ZPipeline[Any, Nothing, In, Out]

Creates a pipeline that maps elements with the specified function.

Creates a pipeline that maps elements with the specified function.

def mapAccum[In, State, Out](s: => State)(f: (State, In) => (State, Out))(implicit trace: Trace): ZPipeline[Any, Nothing, In, Out]

Creates a pipeline that statefully maps elements with the specified function.

Creates a pipeline that statefully maps elements with the specified function.

def mapAccumZIO[Env, Err, In, State, Out](s: => State)(f: (State, In) => ZIO[Env, Err, (State, Out)])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

Creates a pipeline that statefully maps elements with the specified effect.

Creates a pipeline that statefully maps elements with the specified effect.

def mapChunks[In, Out](f: Chunk[In] => Chunk[Out])(implicit trace: Trace): ZPipeline[Any, Nothing, In, Out]

Creates a pipeline that maps chunks of elements with the specified function.

Creates a pipeline that maps chunks of elements with the specified function.

def mapChunksZIO[Env, Err, In, Out](f: Chunk[In] => ZIO[Env, Err, Chunk[Out]])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

Creates a pipeline that maps chunks of elements with the specified effect.

Creates a pipeline that maps chunks of elements with the specified effect.

def mapZIO[Env, Err, In, Out](f: In => ZIO[Env, Err, Out])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

Creates a pipeline that maps elements with the specified effectful function.

Creates a pipeline that maps elements with the specified effectful function.

def prepend[In](values: => Chunk[In])(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Emits the provided chunk before emitting any other value.

Emits the provided chunk before emitting any other value.

def rechunk[In](n: => Int)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

A pipeline that rechunks the stream into chunks of the specified size.

A pipeline that rechunks the stream into chunks of the specified size.

def scan[In, Out](s: => Out)(f: (Out, In) => Out)(implicit trace: Trace): ZPipeline[Any, Nothing, In, Out]

Creates a pipeline that scans elements with the specified function.

Creates a pipeline that scans elements with the specified function.

def scanZIO[Env, Err, In, Out](s: => Out)(f: (Out, In) => ZIO[Env, Err, Out])(implicit trace: Trace): ZPipeline[Env, Err, In, Out]

Creates a pipeline that scans elements with the specified function.

Creates a pipeline that scans elements with the specified function.

def splitLines(implicit trace: Trace): ZPipeline[Any, Nothing, String, String]

Splits strings on newlines. Handles both Windows newlines (\r\n) and UNIX newlines (\n).

Splits strings on newlines. Handles both Windows newlines (\r\n) and UNIX newlines (\n).

def splitOn(delimiter: => String)(implicit trace: Trace): ZPipeline[Any, Nothing, String, String]

Splits strings on a delimiter.

Splits strings on a delimiter.

def splitOnChunk[In](delimiter: => Chunk[In])(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Splits strings on a delimiter.

Splits strings on a delimiter.

def suspend[Env, Err, In, Out](pipeline: => ZPipeline[Env, Err, In, Out]): ZPipeline[Env, Err, In, Out]

Lazily constructs a pipeline.

Lazily constructs a pipeline.

def take[In](n: => Long)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that takes n elements.

Creates a pipeline that takes n elements.

def takeUntil[In](f: In => Boolean)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that takes elements until the specified predicate evaluates to true.

Creates a pipeline that takes elements until the specified predicate evaluates to true.

def takeWhile[In](f: In => Boolean)(implicit trace: Trace): ZPipeline[Any, Nothing, In, In]

Creates a pipeline that takes elements while the specified predicate evaluates to true.

Creates a pipeline that takes elements while the specified predicate evaluates to true.

Creates a pipeline that converts a stream of bytes into a stream of strings using the US ASCII charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the US ASCII charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the US ASCII charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the US ASCII charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_16BE charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_16BE charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16BE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16BE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_16 charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_16 charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_16LE charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_16LE charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16LE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16LE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16LE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16LE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16 charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_16 charset prefixing it with a BOM

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_32BE charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_32BE charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_32 charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_32 charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset, without adding a BOM

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_32LE charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_32LE charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32LE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32LE charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32LE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32LE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_32BE charset prefixing it with a BOM

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_8 charset

Creates a pipeline that converts a stream of bytes into a stream of strings using the UTF_8 charset

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_8 charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_8 charset, without adding a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_8 charset prefixing it with a BOM

Creates a pipeline that converts a stream of strings into a stream of bytes using the UTF_8 charset prefixing it with a BOM

utfDecode determines the right encoder to use based on the Byte Order Mark (BOM). If it doesn't detect one, it defaults to utf8Decode. In the case of utf16 and utf32 without BOM, utf16Decode and utf32Decode should be used instead as both default to their own default decoder respectively.

utfDecode determines the right encoder to use based on the Byte Order Mark (BOM). If it doesn't detect one, it defaults to utf8Decode. In the case of utf16 and utf32 without BOM, utf16Decode and utf32Decode should be used instead as both default to their own default decoder respectively.