t

zio.schema

MutableSchemaBasedValueProcessor

trait MutableSchemaBasedValueProcessor[Target, Context] extends AnyRef

Base trait for mutable value processors, processing a value with a known schema. An example is protocol encoders.

The implementation is stack safe and consists of invocations of a series of processXYZ methods, as well as built-in support for a context value which is handled in a stacked way.

Maintaining any global state (per process) such as stream writers etc. is the responsibility of the implementation class.

The Target type parameter is the base type for the process function's output value. In case the process is built entirely using side effects (such as calls to a mutable writer interface) this type can be Unit.

The Context type parameter is the use-case specific context type which is passed for each process invocation, and can be manipulated before each process call achieving a local state.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MutableSchemaBasedValueProcessor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def contextForEither(context: Context, e: Either[Unit, Unit]): Context

    Gets the context for an either's left or right value within the parent context

    Gets the context for an either's left or right value within the parent context

    Attributes
    protected
  2. abstract def contextForEnumConstructor(context: Context, index: Int, c: Case[_, _]): Context

    Gets the context for an enum's given constructor within the parent context

    Gets the context for an enum's given constructor within the parent context

    Attributes
    protected
  3. abstract def contextForMap(context: Context, schema: Map[_, _], index: Int): Context

    Gets the context for a dictionary's given element within the parent context

    Gets the context for a dictionary's given element within the parent context

    Attributes
    protected
  4. abstract def contextForOption(context: Context, o: Option[Unit]): Context

    Gets the context for an option's inner value within the parent context

    Gets the context for an option's inner value within the parent context

    Attributes
    protected
  5. abstract def contextForRecordField(context: Context, index: Int, field: Field[_, _]): Context

    Gets the context for a record's given field within the parent context

    Gets the context for a record's given field within the parent context

    Attributes
    protected
  6. abstract def contextForSequence(context: Context, schema: Sequence[_, _, _], index: Int): Context

    Gets the context for a sequence's given element within the parent context

    Gets the context for a sequence's given element within the parent context

    Attributes
    protected
  7. abstract def contextForSet(context: Context, schema: Set[_], index: Int): Context

    Gets the context for a set's given element within the parent context

    Gets the context for a set's given element within the parent context

    Attributes
    protected
  8. abstract def contextForTuple(context: Context, index: Int): Context

    Gets the context for a tuple's given field within the parent context

    Gets the context for a tuple's given field within the parent context

    Attributes
    protected
  9. abstract def fail(context: Context, message: String): Target

    Fails the processing

    Fails the processing

    Attributes
    protected
  10. abstract val initialContext: Context

    The initial (top-level) context value

    The initial (top-level) context value

    Attributes
    protected
  11. abstract def processDictionary(context: Context, schema: Map[_, _], value: Chunk[(Target, Target)]): Target

    * Process a dictionary using its already processed key-value pairs

    * Process a dictionary using its already processed key-value pairs

    Attributes
    protected
  12. abstract def processDynamic(context: Context, value: DynamicValue): Option[Target]

    Process a dynamic value.

    Process a dynamic value. If the result is None it indicates that the processor has no built-in support for dynamic values, and the Dynamic value's schema should be used instead.

    Attributes
    protected
  13. abstract def processEither(context: Context, schema: Either[_, _], value: Either[Target, Target]): Target

    Process an either value using its already processed left or right value

    Process an either value using its already processed left or right value

    Attributes
    protected
  14. abstract def processEnum(context: Context, schema: Enum[_], tuple: (String, Target)): Target

    Process an enum in the given context with the given schema using the processed constructor value and it's name

    Process an enum in the given context with the given schema using the processed constructor value and it's name

    Attributes
    protected
  15. abstract def processOption(context: Context, schema: Optional[_], value: Option[Target]): Target

    Process an optional value using its already processed inner value, or None

    Process an optional value using its already processed inner value, or None

    Attributes
    protected
  16. abstract def processPrimitive(context: Context, value: Any, typ: StandardType[Any]): Target

    Process a primitive value

    Process a primitive value

    Attributes
    protected
  17. abstract def processRecord(context: Context, schema: Record[_], value: ListMap[String, Target]): Target

    Process a record in the given context with the given schema, using the already processed values of its fields.

    Process a record in the given context with the given schema, using the already processed values of its fields.

    Attributes
    protected
  18. abstract def processSequence(context: Context, schema: Sequence[_, _, _], value: Chunk[Target]): Target

    Process a sequence using its already processed elements

    Process a sequence using its already processed elements

    Attributes
    protected
  19. abstract def processSet(context: Context, schema: Set[_], value: Set[Target]): Target

    Process a set using its already processed elements

    Process a set using its already processed elements

    Attributes
    protected
  20. abstract def processTuple(context: Context, schema: Tuple2[_, _], left: Target, right: Target): Target

    Process a tuple using its already processed left and right values

    Process a tuple using its already processed left and right values

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. def process[A](schema: Schema[A], value: A): Target

    Process a value based on it's schema

  16. def startProcessingDictionary(context: Context, schema: Map[_, _], size: Int): Unit

    Called before processing a dictionary

    Called before processing a dictionary

    Attributes
    protected
    Annotations
    @nowarn()
  17. def startProcessingEither(context: Context, schema: Either[_, _]): Unit

    Called before processing and either value

    Called before processing and either value

    Attributes
    protected
    Annotations
    @nowarn()
  18. def startProcessingEnum(context: Context, schema: Enum[_]): Unit

    Called before processing an enum

    Called before processing an enum

    Attributes
    protected
    Annotations
    @nowarn()
  19. def startProcessingOption(context: Context, schema: Optional[_]): Unit

    Called before processing an option value

    Called before processing an option value

    Attributes
    protected
    Annotations
    @nowarn()
  20. def startProcessingRecord(context: Context, schema: Record[_]): Unit

    Called before processing a record (before calling processXYZ for the record's fields)

    Called before processing a record (before calling processXYZ for the record's fields)

    Attributes
    protected
    Annotations
    @nowarn()
  21. def startProcessingSequence(context: Context, schema: Sequence[_, _, _], size: Int): Unit

    Called before processing a sequence

    Called before processing a sequence

    Attributes
    protected
    Annotations
    @nowarn()
  22. def startProcessingSet(context: Context, schema: Set[_], size: Int): Unit

    Called before processing a set

    Called before processing a set

    Attributes
    protected
    Annotations
    @nowarn()
  23. def startProcessingTuple(context: Context, schema: Tuple2[_, _]): Unit

    Called before processing a pair of values

    Called before processing a pair of values

    Attributes
    protected
    Annotations
    @nowarn()
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped