CRYPTO SDK
Toggle table of contents
2025.11.02
androidJvm
Target filter
androidJvm
Switch theme
Search in API
Skip to content
CRYPTO SDK
Crypto-common
/
cz.kotox.crypto.sdk.common
/
Either
Either
sealed
class
Either
<
out
E
,
out
V
>
Inheritors
Value
Error
Members
Members & Extensions
Types
Error
Link copied to clipboard
data
class
Error
<
out
E
>
(
val
error
:
E
)
:
Either
<
E
,
Nothing
>
Value
Link copied to clipboard
data
class
Value
<
out
V
>
(
val
value
:
V
)
:
Either
<
Nothing
,
V
>
Functions
catch
Error
Link copied to clipboard
inline
fun
<
E
,
V
>
Either
<
E
,
V
>
.
catchError
(
action
:
(
E
)
->
Nothing
)
:
V
do
On
Error
Link copied to clipboard
inline
fun
<
V
,
E
>
Either
<
E
,
V
>
.
doOnError
(
action
:
(
E
)
->
Unit
)
:
Either
<
E
,
V
>
do
On
Value
Link copied to clipboard
inline
fun
<
V
,
E
>
Either
<
E
,
V
>
.
doOnValue
(
action
:
(
V
)
->
Unit
)
:
Either
<
E
,
V
>
flat
Map
Link copied to clipboard
infix inline
fun
<
V
,
V2
,
E
>
Either
<
E
,
V
>
.
flatMap
(
func
:
(
V
)
->
Either
<
E
,
V2
>
)
:
Either
<
E
,
V2
>
flat
Map
Error
Link copied to clipboard
infix inline
fun
<
V
,
E
,
E2
>
Either
<
E
,
V
>
.
flatMapError
(
func
:
(
E
)
->
Either
<
E2
,
V
>
)
:
Either
<
E2
,
V
>
fold
Link copied to clipboard
inline
fun
<
E
,
V
,
A
>
Either
<
E
,
V
>
.
fold
(
error
:
(
E
)
->
A
,
value
:
(
V
)
->
A
)
:
A
fold
Unit
Link copied to clipboard
inline
fun
<
E
>
Either
<
E
,
Unit
>
.
foldUnit
(
error
:
(
E
)
->
Unit
)
get
Error
Link copied to clipboard
fun
<
E
,
V
>
Either
<
E
,
V
>
.
getError
(
)
:
E
?
get
Value
Link copied to clipboard
fun
<
E
,
V
>
Either
<
E
,
V
>
.
getValue
(
)
:
V
?
map
Link copied to clipboard
infix inline
fun
<
V
,
V2
,
E
>
Either
<
E
,
V
>
.
map
(
func
:
(
V
)
->
V2
)
:
Either
<
E
,
V2
>
map
Error
Link copied to clipboard
infix inline
fun
<
V
,
E
,
E2
>
Either
<
E
,
V
>
.
mapError
(
func
:
(
E
)
->
E2
)
:
Either
<
E2
,
V
>
map
Iterable
Link copied to clipboard
infix inline
fun
<
V
,
V2
,
E
>
Either
<
E
,
List
<
V
>
>
.
mapIterable
(
func
:
(
V
)
->
V2
)
:
Either
<
E
,
List
<
V2
>
>