CustomMap
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CustomMap.type
Members list
Extensions
Extensions
Retrieves an optional sub-map from the given map by key.
Retrieves an optional sub-map from the given map by key.
Value parameters
- key
-
the key to look for in the map
Attributes
- Returns
-
a
ConfigResult
containing anOption[Map[String, Any]]
. If the key is present it returnsRight(Some(subMap))
, if the key is missing it returnsRight(None)
, and if there's an error it returnsLeft(errors)
.
Retrieves a sub-map from the given map by key.
Retrieves a sub-map from the given map by key.
Value parameters
- key
-
the key to look for in the map
Attributes
- Returns
-
a
ConfigResult
containing the sub-map. If the key is present and the value is a map, it returnsRight(subMap)
, if the key is missing it returnsLeft(errors)
with aConfigError.MissingField
, and if the value is not a map it returnsLeft(errors)
with aConfigError.InvalidType
Parses a sequence of elements from the map using a provided parsing function.
Parses a sequence of elements from the map using a provided parsing function.
Type parameters
- A
-
the type of elements in the sequence
Value parameters
- key
-
the key to look for in the map
- parseFunc
-
a function that takes a
Map[String, Any]
and returns aConfigResult[A]
Attributes
- Returns
-
a
ConfigResult[Seq[A]]
containing the parsed sequence. If the key is present and the value is a list of maps, it applies theparseFunc
to each element. If the key is missing, it returns an empty sequence. If the value is not a list of maps, it returns aLeft
with aConfigError.InvalidType
.