ConfigMapper

fallatol.config.ConfigMapper
See theConfigMapper companion trait
object ConfigMapper

Contains basic ConfigMapper instances for types are obtainable out of the box by the sconfig library. This includes some primitives like String, Int, Long, Double, Number, and Boolean, as well as org.ekrich.config.Config, which is used for nested configuration, as well as ConfigMappers for List and Map with String keys.

Also has the from method for building a new ConfigMapper from an existing ConfigMapper.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def from[A, B](f: A => ConfigResult[B])(implicit acm: ConfigMapper[A]): ConfigMapper[B]

Create a ConfigMapper for type B by providing a function mapping type A, with a defined ConfigMapper to ConfigResult of type B.

Create a ConfigMapper for type B by providing a function mapping type A, with a defined ConfigMapper to ConfigResult of type B.

Attributes

Implicits

Implicits

implicit val booleanConfigMapper: ConfigMapper[Boolean]
implicit val configConfigMapper: ConfigMapper[Config]
implicit def configListMapper[A](implicit cm: ConfigMapper[A]): ConfigMapper[List[A]]
implicit def configMapMapper[A](implicit cm: ConfigMapper[A]): ConfigMapper[Map[String, A]]
implicit val doubleConfigMapper: ConfigMapper[Double]
implicit val intConfigMapper: ConfigMapper[Int]
implicit val longConfigMapper: ConfigMapper[Long]
implicit val numberConfigMapper: ConfigMapper[Number]
implicit val stringConfigMapper: ConfigMapper[String]