MapOfResults<K, V extends Object> extension
Properties
Methods
-
partition(
) → MapResultPartition< K, V> -
Available on Map<
Partitions the map into a record containing two maps: one for Ok values and one for Err values.K, Result< , provided by the MapOfResults extensionV> > -
sequence(
) → Result< Map< K, V> > -
Available on Map<
Turns aK, Result< , provided by the MapOfResults extensionV> >Map<K, Result<V>>
into aResult<Map<K, V>>
. If all values are Ok, it returns anOk<Map<K, V>>
. If any value is an Err, it returns the first Err encountered. -
whereErr(
) → Map< K, Err< V> > -
Available on Map<
Creates a new map containing only the entries where the value is an Err. The values in the new map are instances of Err<V>.K, Result< , provided by the MapOfResults extensionV> > -
whereOk(
) → Map< K, Ok< V> > -
Available on Map<
Creates a new map containing only the entries where the value is an Ok. The values in the new map are instances of Ok<V>.K, Result< , provided by the MapOfResults extensionV> >