AsCharBuffer

fs2.data.text.AsCharBuffer
sealed trait AsCharBuffer[F[_], T] extends CharLikeChunks[F, T]

Attributes

Source
CharLikeChunks.scala
Graph
Supertypes
trait CharLikeChunks[F, T]
class Object
trait Matchable
class Any

Members list

Type members

Inherited types

type Context

The context used to pull chunks and iterate over characters.

The context used to pull chunks and iterate over characters. Implementations might decide to have immutable or mutable contexts depending on performance constraints that are desired.

Attributes

Inherited from:
CharLikeChunks
Source
CharLikeChunks.scala

Value members

Abstract methods

Attributes

Source
CharLikeChunks.scala
def mark(ctx: Context): Unit

Attributes

Source
CharLikeChunks.scala

Inherited methods

def advance(ctx: Context): Context

Advances one character in the context.

Advances one character in the context. This method is called for stepping through characters, so it is preferrable to have it efficient. Implemetations can be based on mutable Context, as a new one is created locally by the parsers.

This should not perform any effect or pull.

Implementations can assume that needsPull will be called after this step function to check boundaries within the current chunk in the context.

Attributes

Inherited from:
CharLikeChunks
Source
CharLikeChunks.scala
def create(s: Stream[F, T]): Context

Creates a context out of a stream.

Creates a context out of a stream.

Attributes

Inherited from:
CharLikeChunks
Source
CharLikeChunks.scala
def current(ctx: Context): Char

Returns the current character in the context.

Returns the current character in the context.

Implementations can assume this will never fail, as parsers will check for needsPull and pullNext before calling this function.

This should not perform any effect or pull and must be pure.

Attributes

Inherited from:
CharLikeChunks
Source
CharLikeChunks.scala

Decides whether a new chunk must be pulled from the context.

Decides whether a new chunk must be pulled from the context.

Attributes

Inherited from:
CharLikeChunks
Source
CharLikeChunks.scala
def pullNext(ctx: Context): Pull[F, Nothing, Option[Context]]

Pulls the next chunk from the context.

Pulls the next chunk from the context. Returns None if stream is exhausted.

Attributes

Inherited from:
CharLikeChunks
Source
CharLikeChunks.scala