toggle menu
composeApp
common
switch theme
search in API
composeApp
/
net.decodex.dcp.core.utils
Package-level
declarations
Types
Functions
Types
Empty
Result
Link copied to clipboard
typealias
EmptyResult
<
E
>
=
Result
<
Unit
,
E
>
Error
Link copied to clipboard
interface
Error
Instant
Serializer
Link copied to clipboard
object
InstantSerializer
:
KSerializer
<
Instant
>
Network
Error
Link copied to clipboard
enum
NetworkError
:
Enum
<
NetworkError
>
,
Error
Result
Link copied to clipboard
sealed
interface
Result
<
out
D
,
out
E
:
Error
>
Functions
as
Empty
Data
Result
Link copied to clipboard
fun
<
T
,
E
:
Error
>
Result
<
T
,
E
>
.
asEmptyDataResult
(
)
:
EmptyResult
<
E
>
map
Link copied to clipboard
inline
fun
<
T
,
E
:
Error
,
R
>
Result
<
T
,
E
>
.
map
(
map
:
(
T
)
->
R
)
:
Result
<
R
,
E
>
map
Client
Error
Link copied to clipboard
fun
mapClientError
(
statusCode
:
HttpStatusCode
)
:
NetworkError
on
Error
Link copied to clipboard
inline
fun
<
T
,
E
:
Error
>
Result
<
T
,
E
>
.
onError
(
action
:
(
E
)
->
Unit
)
:
Result
<
T
,
E
>
on
Success
Link copied to clipboard
inline
fun
<
T
,
E
:
Error
>
Result
<
T
,
E
>
.
onSuccess
(
action
:
(
T
)
->
Unit
)
:
Result
<
T
,
E
>
safe
Api
Call
Link copied to clipboard
inline suspend
fun
<
T
>
safeApiCall
(
call
:
(
)
->
HttpResponse
)
:
Result
<
T
,
NetworkError
>