toggle menu
io.github.goquati
1.3.1
common
switch theme
search in API
io.github.goquati
/
io.github.goquati.kotlin.util
/
Result
Result
common
value
class
Result
<
out
T
,
out
E
>
Members
Members & Extensions
Properties
as
Failure
Link copied to clipboard
common
val
asFailure
:
Result
<
Nothing
,
E
>
as
Success
Link copied to clipboard
common
val
asSuccess
:
Result
<
T
,
Nothing
>
failure
Link copied to clipboard
common
val
failure
:
E
failure
Or
Null
Link copied to clipboard
common
val
failureOrNull
:
E
?
is
Failure
Link copied to clipboard
common
val
isFailure
:
Boolean
is
Success
Link copied to clipboard
common
val
isSuccess
:
Boolean
success
Link copied to clipboard
common
val
success
:
T
success
Or
Null
Link copied to clipboard
common
val
successOrNull
:
T
?
Functions
flat
Map
Link copied to clipboard
common
inline
fun
<
T1
,
T2
,
E
>
Result
<
T1
,
E
>
.
flatMap
(
block
:
(
T1
)
->
Result
<
T2
,
E
>
)
:
Result
<
T2
,
E
>
flatten
Link copied to clipboard
common
fun
<
T
,
E
>
Result
<
Result
<
T
,
E
>
,
E
>
.
flatten
(
)
:
Result
<
T
,
E
>
get
Failure
Or
Link copied to clipboard
common
fun
<
E
>
Result
<
*
,
E
>
.
getFailureOr
(
default
:
E
)
:
E
inline
fun
<
T
,
E
>
Result
<
T
,
E
>
.
getFailureOr
(
block
:
(
T
)
->
E
)
:
E
get
Or
Link copied to clipboard
common
fun
<
T
>
Result
<
T
,
*
>
.
getOr
(
default
:
T
)
:
T
inline
fun
<
T
,
E
>
Result
<
T
,
E
>
.
getOr
(
block
:
(
E
)
->
T
)
:
T
get
Or
Throw
Link copied to clipboard
common
fun
<
T
,
E
:
Throwable
>
Result
<
T
,
E
>
.
getOrThrow
(
)
:
T
map
Link copied to clipboard
common
inline
fun
<
T1
,
T2
,
E
>
Result
<
T1
,
E
>
.
map
(
block
:
(
T1
)
->
T2
)
:
Result
<
T2
,
E
>
map
Error
Link copied to clipboard
common
inline
fun
<
T
,
E1
,
E2
>
Result
<
T
,
E1
>
.
mapError
(
block
:
(
E1
)
->
E2
)
:
Result
<
T
,
E2
>
to
String
Link copied to clipboard
common
open
override
fun
toString
(
)
:
String