Path

io.scalaland.chimney.partial.Path
See thePath companion object
final case class Path(elements: List[PathElement]) extends AnyVal

Data structure for representing path in a (possibly) nested object structure.

Value parameters

elements

list of path elements

Attributes

Since

0.7.0

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def asString: String

Returns conventional String-based representation of a path.

Returns conventional String-based representation of a path.

Attributes

Since

0.7.0

def prepend(pathElement: PathElement): Path

Prepend of error path with a path element.

Prepend of error path with a path element.

Value parameters

pathElement

path element to be prepended

Attributes

Returns

path with prepended path element

Since

0.7.0

def unsealPath(): Unit

Unseals the io.scalaland.chimney.partial.Path of current io.scalaland.chimney.partial.Error.

When derivation is building up the result it automatically appends fields/indices/map keys - however values obtained with withFieldComputed(Partial)(From) contains the whole Path already, so prepend should be a noop for them.

However, this path can only be precomputed only up to the boundaries of a io.scalaland.chimney.PartialTransformer, and when one transformer calls another, path should be appended again. This method allows this.

Attributes

Since

1.6.0

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product