MutableSchemaBasedValueBuilder

zio.schema.MutableSchemaBasedValueBuilder
See theMutableSchemaBasedValueBuilder companion object
trait MutableSchemaBasedValueBuilder[Target, Context]

Base trait for mutable builders producing a value based on a schema, such as codec decoders.

The implementation is stack safe and consists of a series of invocations of the protected methods the trait defines. Maintaining the state of the builder, such as stream position etc. is the responsibility of the implementation class via mutable state.

The Target type parameter is the base type for the generated values - this in many cases can be Any but potentially could be used to track errors in value level as well - although failure in the context handler manipulation methods cannot be expressed this way.

The Context type parameter is a use-case dependent type that is managed in a stack during the execution of the builder. The implementation can generate new context values for the value's subtrees and it can be used to track local state required for gathering all information for the value to be created. The current context value is also propagated to any exception thrown so it can be used to provide detailed location information for decoder errors.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def create[A](schema: Schema[A]): Target

Create a value of type A with the provided schema using this builder

Create a value of type A with the provided schema using this builder

Attributes