toggle menu
network-either-kmp
0.3.0-SNAPSHOT
common
switch theme
search in API
resource-either
/
com.javiersc.resource.either
/
ResourceEither
/
Failure
Failure
data
class
Failure
<
out
F
,
out
S
>
(
val
failure
:
F
,
val
data
:
S
?
=
null
,
val
isLoading
:
Boolean
=
false
)
:
ResourceEither
<
F
,
S
>
Members
Constructors
Failure
Link copied to clipboard
constructor
(
failure
:
F
,
data
:
S
?
=
null
,
isLoading
:
Boolean
=
false
)
Properties
data
Link copied to clipboard
val
data
:
S
?
=
null
failure
Link copied to clipboard
val
failure
:
F
is
Loading
Link copied to clipboard
open
override
val
isLoading
:
Boolean
=
false
Functions
fold
Link copied to clipboard
inline
fun
<
A
>
fold
(
failure
:
(
ResourceEither.Failure
<
F
,
S
>
)
->
A
,
success
:
(
ResourceEither.Success
<
S
>
)
->
A
)
:
A
if
Failure
Link copied to clipboard
inline
fun
ifFailure
(
block
:
(
ResourceEither.Failure
<
F
,
S
>
)
->
Unit
)
if
Success
Link copied to clipboard
inline
fun
ifSuccess
(
block
:
(
ResourceEither.Success
<
S
>
)
->
Unit
)
is
Failure
Link copied to clipboard
fun
isFailure
(
)
:
Boolean
is
Loading
Link copied to clipboard
@
JvmName
(
name
=
"getIsLoading"
)
fun
isLoading
(
)
:
Boolean
is
Success
Link copied to clipboard
fun
isSuccess
(
)
:
Boolean
success
Data
Or
Null
Link copied to clipboard
fun
successDataOrNull
(
)
:
S
?
success
Or
Null
Link copied to clipboard
fun
successOrNull
(
)
:
ResourceSuccess
<
S
>
?
to
Either
Link copied to clipboard
inline
fun
<
L
,
R
>
toEither
(
failure
:
(
ResourceEither.Failure
<
F
,
S
>
)
->
L
,
success
:
(
ResourceEither.Success
<
S
>
)
->
R
)
:
Either
<
L
,
R
>