trait ConfigConvert[A] extends ConfigReader[A] with ConfigWriter[A]

Trait for objects capable of reading and writing objects of a given type from and to ConfigValues.

Self Type
ConfigConvert[A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfigConvert
  2. ConfigWriter
  3. ConfigReader
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def from(cur: ConfigCursor): Result[A]

    Convert the configuration given by a cursor into an instance of A if possible.

    Convert the configuration given by a cursor into an instance of A if possible.

    cur

    The cursor from which the config should be loaded

    returns

    either a list of failures or an object of type A

    Definition Classes
    ConfigReader
  2. abstract def to(a: A): ConfigValue

    Converts a type A to a ConfigValue.

    Converts a type A to a ConfigValue.

    a

    The instance of A to convert

    returns

    The ConfigValue obtained from the A instance

    Definition Classes
    ConfigWriter

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( ... ) @native()
  6. def contramap[B](f: (B) ⇒ A): ConfigWriter[B]

    Applies a function to values before passing them to this writer.

    Applies a function to values before passing them to this writer.

    B

    the input type of the function

    f

    the function to apply to input values

    returns

    a ConfigWriter that writes the results of this writer when the input values are mapped using f.

    Definition Classes
    ConfigWriter
  7. def contramapConfig(f: (ConfigValue) ⇒ ConfigValue): ConfigReader[A]

    Applies a function to configs before passing them to this reader.

    Applies a function to configs before passing them to this reader.

    f

    the function to apply to input configs

    returns

    a ConfigReader returning the results of this reader when the input configs are mapped using f.

    Definition Classes
    ConfigReader
  8. def contramapCursor(f: (ConfigCursor) ⇒ ConfigCursor): ConfigReader[A]

    Applies a function to config cursors before passing them to this reader.

    Applies a function to config cursors before passing them to this reader.

    f

    the function to apply to input config cursors

    returns

    a ConfigReader returning the results of this reader when the input cursors are mapped using f.

    Definition Classes
    ConfigReader
  9. def emap[B](f: (A) ⇒ Either[FailureReason, B]): ConfigReader[B]

    Maps a function that can possibly fail over the results of this reader.

    Maps a function that can possibly fail over the results of this reader.

    B

    the value read by the function in case of success

    f

    the function to map over this reader

    returns

    a ConfigReader returning the results of this reader mapped by f, with the resulting Either flattened as a success or failure.

    Definition Classes
    ConfigReader
  10. def ensure(pred: (A) ⇒ Boolean, message: (A) ⇒ String): ConfigReader[A]

    Fails the reader if the condition does not hold for the result.

    Fails the reader if the condition does not hold for the result.

    pred

    the condition to assert

    message

    the failed validation message

    returns

    a ConfigReader returning the results of this reader if the condition holds or a failed reader otherwise.

    Definition Classes
    ConfigReader
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def flatMap[B](f: (A) ⇒ ConfigReader[B]): ConfigReader[B]

    Monadically bind a function over the results of this reader.

    Monadically bind a function over the results of this reader.

    B

    the type of the objects readable by the resulting ConfigReader

    f

    the function to bind over this reader

    returns

    a ConfigReader returning the results of this reader bound by f.

    Definition Classes
    ConfigReader
  15. def from(config: ConfigValue): Result[A]

    Convert the given configuration into an instance of A if possible.

    Convert the given configuration into an instance of A if possible.

    config

    The configuration from which the config should be loaded

    returns

    either a list of failures or an object of type A

    Definition Classes
    ConfigReader
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def map[B](f: (A) ⇒ B): ConfigReader[B]

    Maps a function over the results of this reader.

    Maps a function over the results of this reader.

    B

    the output type of the function

    f

    the function to map over this reader

    returns

    a ConfigReader returning the results of this reader mapped by f.

    Definition Classes
    ConfigReader
  20. def mapConfig(f: (ConfigValue) ⇒ ConfigValue): ConfigWriter[A]

    Maps a function over the results of this writer.

    Maps a function over the results of this writer.

    f

    the function to map over this writer

    returns

    a ConfigWriter returning the results of this writer mapped by f.

    Definition Classes
    ConfigWriter
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def orElse[AA >: A, B <: AA](reader: ⇒ ConfigReader[B]): ConfigReader[AA]

    Combines this reader with another, returning the result of the first one that succeeds.

    Combines this reader with another, returning the result of the first one that succeeds.

    AA

    the type of the objects readable by both readers

    reader

    the reader to combine with this one

    returns

    a ConfigReader returning the results of this reader if it succeeds and the results of reader otherwise.

    Definition Classes
    ConfigReader
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  30. def xemap[B](f: (A) ⇒ Either[FailureReason, B], g: (B) ⇒ A): ConfigConvert[B]

    Transforms the values read and written by this ConfigConvert using two functions where the reader may specify custom failure reason.

    Transforms the values read and written by this ConfigConvert using two functions where the reader may specify custom failure reason.

    B

    the type of the returned ConfigConvert

    f

    the function applied to values after they are read

    g

    the function applied to values before they are written

    returns

    a ConfigConvert that reads and writes values of type B by applying f and g on read and write, respectively.

  31. def xmap[B](f: (A) ⇒ B, g: (B) ⇒ A): ConfigConvert[B]

    Transforms the values read and written by this ConfigConvert using two functions.

    Transforms the values read and written by this ConfigConvert using two functions.

    B

    the type of the returned ConfigConvert

    f

    the function applied to values after they are read; a thrown exception will be caught and converted to a pureconfig FailureReason

    g

    the function applied to values before they are written

    returns

    a ConfigConvert that reads and writes values of type B by applying f and g on read and write, respectively.

  32. def zip[B](reader: ConfigReader[B]): ConfigReader[(A, B)]

    Combines this reader with another, returning both results as a pair.

    Combines this reader with another, returning both results as a pair.

    B

    the type of the objects readable by the provided reader

    reader

    the reader to combine with this one

    returns

    a ConfigReader returning the results of both readers as a pair.

    Definition Classes
    ConfigReader

Inherited from ConfigWriter[A]

Inherited from ConfigReader[A]

Inherited from AnyRef

Inherited from Any

Ungrouped