TaggedFromTo

trait TaggedFromTo[T] extends FromTo[T] with TaggedTo[T] with TaggedFrom[T] with SimpleTo[T]
Companion
object
trait TaggedFrom[T]
trait TaggedTo[T]
trait Tagged
trait SimpleTo[T]
trait SimpleVisitor[Any, T]
trait FromTo[T]
trait To[T]
trait Visitor[Any, T]
trait AutoCloseable
trait From[T]
class Object
trait Matchable
class Any
class Leaf[T]
class Node[T]

Value members

Concrete methods

override
def visitArray(length: Int): ArrVisitor[Any, T]
Definition Classes
override
def visitObject(length: Int): ObjVisitor[Any, T]
Definition Classes

Inherited methods

def bimap[In](f: In => T, g: T => In): FromTo[In]
Inherited from
FromTo
override
def close(): Unit

==Responsibility== Generally, whoever creates the visitor should be responsible for closing it, i.e. not intermediate transform(v: Visitor) methods themselves.

==Responsibility== Generally, whoever creates the visitor should be responsible for closing it, i.e. not intermediate transform(v: Visitor) methods themselves.

==Self Closing== Given that common usage is most often single-valued (e.g. "{}"), rather than multi-valued (e.g. "{} {} {}"), Visitors may self-close (e.g. visitor.map{v => Try(v.close); v)} after a single value to prevent resource leaks, but are encouraged to expose both forms (i.e. single/multiple), if supportable.

==Multiple close() calls/Idempotency== Visitors are encouraged to respond gracefully if close() is called multiple times. If an underlying resource would throw if already closed, this may mean adding a private var isClosed: Boolean field to prevent multiple calls.

Definition Classes
Visitor -> AutoCloseable
Inherited from
Visitor
def comap[U](f: U => T): MapFrom[U, T]
Inherited from
From
def comapNulls[U](f: U => T): MapFromNulls[U, T]
Inherited from
From
override
def expectedMsg: String
Definition Classes
Inherited from
TaggedTo
def findFrom(v: Any): (String, CaseW[T])
Inherited from
TaggedFrom
def findTo(s: String): To[T]
Inherited from
TaggedTo
override
def map[Z](f: T => Z): To[Z]
Definition Classes
Inherited from
To
override
def mapNulls[Z](f: T => Z): To[Z]
Definition Classes
Inherited from
To
override
def narrow[K]: FromTo[K]
Definition Classes
FromTo -> To -> From
Inherited from
FromTo
def tagName: String

Name of the object key used to identify the subclass tag. Tos will fast path if this is the first field of the object. Otherwise, Tos will have to buffer the content and find the tag later. While naming, consider that some implementations (e.g. vpack) may sort object keys, so symbol prefixes work well for ensuring the tag is the first property.

Name of the object key used to identify the subclass tag. Tos will fast path if this is the first field of the object. Otherwise, Tos will have to buffer the content and find the tag later. While naming, consider that some implementations (e.g. vpack) may sort object keys, so symbol prefixes work well for ensuring the tag is the first property.

Inherited from
Tagged
def transform[Out](in: T, out: Visitor[_, Out]): Out
Inherited from
From
override
def transform0[Out](in: T, out: Visitor[_, Out]): Out
Definition Classes
Inherited from
TaggedFrom
def visitBinary(bytes: Array[Byte], offset: Int, len: Int): T
Inherited from
SimpleVisitor
def visitChar(c: Char): T
Inherited from
SimpleVisitor
def visitExt(tag: Byte, bytes: Array[Byte], offset: Int, len: Int): T
Inherited from
SimpleVisitor
def visitFalse(): T
Inherited from
SimpleVisitor
def visitFloat32(d: Float): T
Inherited from
SimpleVisitor
def visitFloat64(d: Double): T
Inherited from
SimpleVisitor
def visitFloat64String(s: String): T
Inherited from
SimpleVisitor
def visitFloat64StringParts(cs: CharSequence, decIndex: Int, expIndex: Int): T
Inherited from
SimpleVisitor
def visitInt32(i: Int): T
Inherited from
SimpleVisitor
def visitInt64(l: Long): T
Inherited from
SimpleVisitor
def visitNull(): T
Inherited from
SimpleVisitor
def visitString(cs: CharSequence): T
Inherited from
SimpleVisitor
def visitTimestamp(instant: Instant): T
Inherited from
SimpleVisitor
def visitTrue(): T
Inherited from
SimpleVisitor
def visitUInt64(ul: Long): T
Inherited from
SimpleVisitor