h8io.cfg

package h8io.cfg

Members list

Packages

package h8io.cfg.impl
package h8io.cfg.schema

Type members

Classlikes

trait CfgError

Marker trait for all errors that can arise during config loading or decoding.

Marker trait for all errors that can arise during config loading or decoding.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AndError
class OrError
trait NodeError
class UnexpectedNode[T]
class Thrown
class Thrown
class INone[I]
class INull[I]
Show all
sealed trait INode[+I <: Id]

A node in the config tree, tagged with its path type I.

A node in the config tree, tagged with its path type I.

Every node in the tree is an INode. Use the type alias Node when the path type does not matter. Concrete variants (all in the Node companion):

Type parameters

I

the Id subtype that describes this node's position in the tree

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class INone[I]
trait ISome[I]
class INull[I]
trait IValue[I]
trait IContainer[I, CI]
trait IMap[I]
trait ISeq[I]
class IScalar[I]
Show all
sealed trait Id

A path addressing a position in the config tree.

A path addressing a position in the config tree.

Every Node carries an Id that identifies where in the tree it lives. The path method renders the full address as a human-readable string using dotted-key notation with bracket-indexed sequences, e.g. server.hosts[0].

Concrete implementations:

  • Id.Root — the top of the tree; path is the empty string
  • Id.Key — a named field inside a map node
  • Id.Index — a positional element inside a sequence node

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Branch
class Index
class Key
trait Root
object Root
object Id

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Id.type
trait Location

Source location of a config value (file name, line number, etc.).

Source location of a config value (file name, line number, etc.).

The format of description is determined by the backend that produced the node.

Attributes

Supertypes
class Object
trait Matchable
class Any
object Node

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Node.type
trait NodeError extends CfgError

A CfgError tied to a specific Node.

A CfgError tied to a specific Node.

When processing a node produces an error, the error should carry that node so callers can report exactly where in the tree the problem occurred. Node.INone and Node.INull implement this trait directly, since the nodes themselves represent erroneous states.

Attributes

Supertypes
trait CfgError
class Object
trait Matchable
class Any
Known subtypes
class UnexpectedNode[T]
class Thrown
class Thrown
class INone[I]
class INull[I]

Types

type Node = INode[Id]

Type alias for INode with an unspecified path type, used throughout the API when the concrete Id subtype does not matter.

Type alias for INode with an unspecified path type, used throughout the API when the concrete Id subtype does not matter.

Attributes