pureconfig

ConfigReader

trait ConfigReader[A] extends AnyRef

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

A

the type of objects readable by this ConfigReader

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConfigReader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def from(cur: ConfigCursor): Either[ConfigReaderFailures, 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

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. 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.

  9. 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.

  10. 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.

  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[java.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.

  15. def from(config: ConfigValue): Either[ConfigReaderFailures, 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

  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  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.

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. 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.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. 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.

Inherited from AnyRef

Inherited from Any

Ungrouped